Skip to content

Instantly share code, notes, and snippets.

@nasyxx
Forked from ykomatsu/nix-macos.md
Created August 3, 2018 12:10
Show Gist options
  • Save nasyxx/30e8fe25394d8a90b4ffa683779fbc12 to your computer and use it in GitHub Desktop.
Save nasyxx/30e8fe25394d8a90b4ffa683779fbc12 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