Giter Club home page Giter Club logo

nix-installer-scripts's Introduction

This repo is now archived. Use Determinate Systems Nix Installer instead.

nix-installer-scripts

Various scripts to install the nix package manager

This may break if something other than bash is not the default login shell so have bash be the default shell. It will be better to make a profile on your terminal application and have a different shell instance that way. If the commands itself give some sort of error, use bash as a shell. Type bash into the terminal to get to bash.

Read This

Installers

Regular installer for non-selinux systems

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/regular-installer.sh | bash

Installer for selinux systems that aren't immutable (Fedora workstation, RHEL, centos stream, rocky alma or oracle linux)

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/regular-nix-installer-selinux.sh | bash

Installer for rpm-ostree based systems like silverblue/kinoite/ublue

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/silverblue-nix-installer.sh | bash

Installer for opensuse microos

first run this

sudo transactional-update run mksubvolume /nix

Reboot

Then run the script

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/nix-microos-installer.sh | bash

Void linux installer

First check if curl is installed

sudo xbps-install -S curl

use the bash shell

bash

Install nix

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/installer-scripts/nix-void-linux-installer.sh | bash

Uninstallers

Regular uninstaller for both non-selinux and selinux muttable systems

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/uninstaller-scripts/regular-uninstaller.sh | bash

Silverblue nix uninstaller

curl -s https://raw.githubusercontent.com/dnkmmr69420/nix-installer-scripts/main/uninstaller-scripts/silverblue-nix-uninstaller.sh | bash

Other useful docs

Extra Scripts

Nix with selinux manual install guide

Old github repos that this repo has replaced list

Compile from source

Common Issues

Some useful nix tools

Fleek: Github-page Website

Nix Portable: Main-Page My-nix-portable-utilities

Devbox: Website Github

Shorten link

https://tinyurl.com/nxscrpts

nix-installer-scripts's People

Contributors

dnkmmr69420 avatar kalguinn avatar rohanssrao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nix-installer-scripts's Issues

Silverblue not fully uninstalling previous install, can't reinstall

I had previously used your silverblue-nix-installer script to install on silverblue (kinoite). Everything find. Then I installed fleek, which worked well at first, but became corrupted. Instead of diving into home-manager and flakes, I uninstalled fleek, then uninstalled Nix using your silverblue-nix-uninstaller. I also removed a few remaining nix related files from my system.

Now I'm trying to INSTALL using silverblue-nix-installer, and I'm getting lots of errors and failure to install Nix. Attached is the output of the script:

silverblue-nix-installer-output.txt

Any help would be appreciated. Thanks.

How to update nix ?

How to update nix when installed from the rpm-ostree os scripts.

I tried

nix upgrade-nix
error: not an absolute path: '../var/usrlocal'

/nix/nix/nix/lib/systemd/system/nix-daemon.service No such file or directory

I had previously used your scripts without fail on two RHEL servers. Trying to add two more to my fleet today, and both gave

deleting and copying services...
cp: cannot stat ‘/nix/nix/nix/lib/systemd/system/nix-daemon.service’: No such file or directory
cp: cannot stat ‘/nix/nix/nix/lib/systemd/system/nix-daemon.socket’: No such file or directory
Enabling services...
Failed to execute operation: No such file or directory
Failed to execute operation: No such file or directory

during install. The nix tool is installed but runs into permission errors. I can't find the nix-daemon.service in /nix, so I copied it from my other machines, and updated the ExecPath and the install works fine, but I wonder if a newer version of nix requires different handling of the systemd components.

Apps not updating

I originally installed nix on my silverblue (bluefin) with the nix-install script included at the time, since removed I understand...

I installed Vivaldi browser version 5.7, works great, icon in the menu showing up and all.

I then updated to the new version 6.0, but when clicking the vivaldi icon in the UI, it still loads version 5.7.

Manually running Vivaldi from the terminal produces version 6.0.

The XDG_DATA_DIRS paths looks ok.

Are there some config missing or updates not happening?

Are there something misconfigured or missing from the old install script? is it safe to rerun the nix-installer-script just in case something is missing?

Multiple "Nix Build Users"

Maybe I missed something in the docs. After installation via script, when logging in to uBlue-Sericea flavor of Silverblue. The sddm login screen shows +/- 20 Nix Build Users along with my standard user.

Is there a way of deleting the "Build Users"?

Thank you

Failed to start nix-daemon.socket: Unit var.mount not found.

Trying to run your script on Fedora 38. Ok I realise its not Silverblue and is beta, but wanted to try nix :)

Running the script gives me an error near the start like:-

 A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.
Failed to start nix.mount: Unit var.mount not found.
restorecon: lstat(/nix) failed: No such file or directory
Temorarly setting SELinux to permissive
Prepareing the nix install script
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4052  100  4052    0     0   2584      0  0:00:01  0:00:01 --:--:--  2584
downloading Nix 2.15.0 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.15.0/nix-2.15.0-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.6nXZEVaOwm'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.0M  100 21.0M    0     0  1662k      0  0:00:12  0:00:12 --:--:-- 2511k
Note: a multi-user installation is possible. See https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation
Switching to the Multi-user Installer
Welcome to the Multi-User Nix Installation

This installation tool will set up your computer with the Nix package
manager. This will happen in a few stages:

1. Make sure your computer doesn't already have Nix. If it does, I
   will show you instructions on how to clean up your old install.

Then everything seems to go swimmingly until near the end when:-

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo systemctl start nix-daemon.socket

to start the nix-daemon.socket

Failed to start nix-daemon.socket: Unit var.mount not found.

---- oh no! --------------------------------------------------------------------
Oh no, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

We'd love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community
Nix installer has finnished running
Now copying service files
Removed "/etc/systemd/system/sockets.target.wants/nix-daemon.socket".
Created symlink /etc/systemd/system/sockets.target.wants/nix-daemon.socket → /etc/systemd/system/nix-daemon.socket.
Failed to start nix-daemon.socket: Unit var.mount not found.
Now setting SELinux back to Enforcing
Making a nix backup
Installing nix backup
#!/bin/bash
sudo echo "Resetting nix..."
sudo rm -rf /nix/*
sudo mkdir -p /nix
sudo cp -R /opt/nb/nix/* /nix/
sudo restorecon -RF /nix
sudo echo "Nix has been resetted. Reboot for changes to apply."
Finnished installing nix backup
Reboot your system by typing
systemctl reboot

Any clues or ideas very welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.