Skip to content

Instantly share code, notes, and snippets.

@ehamberg
Forked from ykomatsu/nix-macos.md
Last active September 3, 2018 12:07
Show Gist options
  • Save ehamberg/68ff4615f95c1acec8e7b6d83196d2b2 to your computer and use it in GitHub Desktop.
Save ehamberg/68ff4615f95c1acec8e7b6d83196d2b2 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 build-users-group line in /etc/nix/nix.conf:

# build-users-group = nixbld

Run the following commands:

$ for i in $(seq 1 32) ; do sudo dscl . -delete /Users/nixbld${i} ; done

$ sudo dscl . -delete /Groups/nixbld

$ sudo chown -R "$USER":staff /nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment