Instantly share code, notes, and snippets.

Embed
What would you like to do?
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