Skip to content

Instantly share code, notes, and snippets.

@ykomatsu
Created October 22, 2017 12:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ykomatsu/b0d0e5792aa84007b9fecfcae2302daa to your computer and use it in GitHub Desktop.
Save ykomatsu/b0d0e5792aa84007b9fecfcae2302daa to your computer and use it in GitHub Desktop.
Installing Nix on macOS in single-user mode

Installing Nix on macOS in single-user mode

$ curl https://nixos.org/nix/install | sh
$ sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
$ sudo launchctl stop org.nixos.nix-daemon

Add the following line to ~/.profile:

NIX_REMOTE=""

Comment out the following line in /etc/nix/nix.conf:

build-users-group = nixbld
$ sudo dscl . -delete /Users/nixbld1
$ sudo dscl . -delete /Users/nixbld2
$ sudo dscl . -delete /Users/nixbld3
$ sudo dscl . -delete /Users/nixbld4
$ sudo dscl . -delete /Groups/nixbld
$ sudo -i nix-channel --remove nixpkgs
$ sudo chown -R ykomatsu:staff /nix
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment