Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. [root@cloud-231 ~]# su tempuser
  2. [tempuser@cloud-231 root]$ curl https://nixos.org/nix/install | sh -s -- --daemon
  3. % Total % Received % Xferd Average Speed Time Time Time Current
  4. Dload Upload Total Spent Left Speed
  5. 100 2472 100 2472 0 0 7744 0 --:--:-- --:--:-- --:--:-- 7749
  6. 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'...
  7. % Total % Received % Xferd Average Speed Time Time Time Current
  8. Dload Upload Total Spent Left Speed
  9. 100 21.0M 100 21.0M 0 0 9210k 0 0:00:02 0:00:02 --:--:-- 9213k
  10. Switching to the Daemon-based Installer
  11. Welcome to the Multi-User Nix Installation
  12.  
  13. This installation tool will set up your computer with the Nix package
  14. manager. This will happen in a few stages:
  15.  
  16. 1. Make sure your computer doesn't already have Nix. If it does, I
  17. will show you instructions on how to clean up your old one.
  18.  
  19. 2. Show you what we are going to install and where. Then we will ask
  20. if you are ready to continue.
  21.  
  22. 3. Create the system users and groups that the Nix daemon uses to run
  23. builds.
  24.  
  25. 4. Perform the basic installation of the Nix files daemon.
  26.  
  27. 5. Configure your shell to import special Nix Profile files, so you
  28. can use Nix.
  29.  
  30. 6. Start the Nix daemon.
  31.  
  32. Would you like to see a more detailed list of what we will do?
  33. No TTY, assuming you would say yes :)
  34.  
  35. We will:
  36.  
  37. - make sure your computer doesn't already have Nix files
  38. (if it does, I will tell you how to clean them up.)
  39. - create local users (see the list above for the users we'll make)
  40. - create a local group (nixbld)
  41. - install Nix in to /nix
  42. - create a configuration file in /etc/nix
  43. - set up the "default profile" by creating some Nix-related files in
  44. /root
  45. - back up /etc/bashrc to /etc/bashrc.backup-before-nix
  46. - update /etc/bashrc to include some Nix configuration
  47. - load and start a service (at /etc/systemd/system/nix-daemon.service
  48. and /etc/systemd/system/nix-daemon.socket) for nix-daemon
  49.  
  50. Ready to continue?
  51. No TTY, assuming you would say yes :)
  52.  
  53. ---- let's talk about sudo -----------------------------------------------------
  54. This script is going to call sudo a lot. Normally, it would show you
  55. exactly what commands it is running and why. However, the script is
  56. run in a headless fashion, like this:
  57.  
  58. $ curl https://nixos.org/nix/install | sh
  59.  
  60. or maybe in a CI pipeline. Because of that, we're going to skip the
  61. verbose output in the interest of brevity.
  62.  
  63. If you would like to
  64. see the output, try like this:
  65.  
  66. $ curl -o install-nix https://nixos.org/nix/install
  67. $ sh ./install-nix
  68.  
  69.  
  70. ---- oh no! --------------------------------------------------------------------
  71. Nix already appears to be installed, and this tool assumes it is
  72. _not_ yet installed.
  73.  
  74.  
  75. Uninstalling nix:
  76. 1. Delete the files Nix added to your system:
  77.  
  78. 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
  79.  
  80. and that is it.
  81.  
  82. We'd love to help if you need it.
  83.  
  84. If you can, open an issue at https://github.com/nixos/nix/issues
  85.  
  86. Or feel free to contact the team,
  87. - on IRC #nixos on irc.freenode.net
  88. - on twitter @nixos_org
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement