λ bash <(curl https://nixos.org/nix/install)
...
Installation finished! To ensure that the necessary environment
variables are set, please add the line
. /Users/gupi/.nix-profile/etc/profile.d/nix.sh
to your shell profile (e.g. ~/.profile).
fish を使う方法は不明
マルチユーザは以下のように --daemon をつける
λ sh <(curl https://nixos.org/nix/install) --daemon
# シングルユーザ
λ rm -rf /nix
# マルチユーザ
λ sudo rm -rf /etc/profile/nix.sh /etc/nix /nix ~root/.nix-profile ~root/.nix-defexpr ~root/.nix-channels ~/.nix-profile ~/.nix-defexpr ~/.nix-channels
## If you are on Linux with systemd, you will need to run:
λ sudo systemctl stop nix-daemon.socket
λ sudo systemctl stop nix-daemon.service
λ sudo systemctl disable nix-daemon.socket
λ sudo systemctl disable nix-daemon.service
λ sudo systemctl daemon-reload
## If you are on macOS, you will need to run:
λ sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
λ sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist
トラブルシューティング
ユーザが変な感じ
$ /var/folders/p9/ln28v7zs7_53lz3ln4xyq2g00000gn/T/nix-binary-tarball/var/foldersXXXXXX.BKisLzLF/unpack/nix-2.2.2-x86_64-darwin/install: directory /nix exists, but is not writable by you. This could indicate that another user has already performed a single-user installation of Nix on this system. If you wish to enable multi-user support see http://nixos.org/nix/manual/#ssec-multi-user. If you wish to continue with a single-user install for gupi please run 'chown -R gupi /nix' as root.
λ sudo chown -R gupi /nix
warning: name collision in input Nix expressions
warning: name collision in input Nix expressions, skipping '/Users/gupi/.nix-defexpr/channels_root/nixpkgs'