Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@cloud-231 ~]# su tempuser
- [tempuser@cloud-231 root]$ curl https://nixos.org/nix/install | sh -s -- --daemon
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 2472 100 2472 0 0 7744 0 --:--:-- --:--:-- --:--:-- 7749
- downloading Nix 2.0.4 binary tarball for x86_64-linux from 'https://nixos.org/releases/nix/nix-2.0.4/nix-2.0.4-x86_64-linux.tar.bz2' to '/tmp/nix-binary-tarball-unpack.VxpHjrnht5'...
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 21.0M 100 21.0M 0 0 9210k 0 0:00:02 0:00:02 --:--:-- 9213k
- Switching to the Daemon-based 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 one.
- 2. Show you what we are going to install and where. Then we will ask
- if you are ready to continue.
- 3. Create the system users and groups that the Nix daemon uses to run
- builds.
- 4. Perform the basic installation of the Nix files daemon.
- 5. Configure your shell to import special Nix Profile files, so you
- can use Nix.
- 6. Start the Nix daemon.
- Would you like to see a more detailed list of what we will do?
- No TTY, assuming you would say yes :)
- We will:
- - make sure your computer doesn't already have Nix files
- (if it does, I will tell you how to clean them up.)
- - create local users (see the list above for the users we'll make)
- - create a local group (nixbld)
- - install Nix in to /nix
- - create a configuration file in /etc/nix
- - set up the "default profile" by creating some Nix-related files in
- /root
- - back up /etc/bashrc to /etc/bashrc.backup-before-nix
- - update /etc/bashrc to include some Nix configuration
- - load and start a service (at /etc/systemd/system/nix-daemon.service
- and /etc/systemd/system/nix-daemon.socket) for nix-daemon
- Ready to continue?
- No TTY, assuming you would say yes :)
- ---- let's talk about sudo -----------------------------------------------------
- This script is going to call sudo a lot. Normally, it would show you
- exactly what commands it is running and why. However, the script is
- run in a headless fashion, like this:
- $ curl https://nixos.org/nix/install | sh
- or maybe in a CI pipeline. Because of that, we're going to skip the
- verbose output in the interest of brevity.
- If you would like to
- see the output, try like this:
- $ curl -o install-nix https://nixos.org/nix/install
- $ sh ./install-nix
- ---- oh no! --------------------------------------------------------------------
- Nix already appears to be installed, and this tool assumes it is
- _not_ yet installed.
- Uninstalling nix:
- 1. Delete the files Nix added to your system:
- sudo rm -rf /etc/nix /nix /root/.nix-profile /root/.nix-defexpr /root/.nix-channels /home/tempuser/.nix-profile /home/tempuser/.nix-defexpr /home/tempuser/.nix-channels
- and that is it.
- We'd love to help if you need it.
- If you can, open an issue at https://github.com/nixos/nix/issues
- Or feel free to contact the team,
- - on IRC #nixos on irc.freenode.net
- - on twitter @nixos_org
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement