Skip to content

Instantly share code, notes, and snippets.

@dmjio
Created August 7, 2020 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmjio/2507643b4612872edade98dac5d6f58c to your computer and use it in GitHub Desktop.
Save dmjio/2507643b4612872edade98dac5d6f58c to your computer and use it in GitHub Desktop.
# run these two lines first
echo 'nix' | sudo tee -a /etc/synthetic.conf # or edit this file and just add nix
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -B
[ 0 -ne "$?" ] && echo "Restarting APFS failed, please reboot your computer"
# reboot if it tells you to reboot
# then run this
sudo diskutil apfs addVolume disk1 APFSX Nix -mountpoint /nix # make sure disk1 is correct
sudo diskutil enableOwnership /nix
sudo chown -R $(whoami) /nix
sudo chflags hidden /nix # if you don't want to see Nix volume in finder
echo "LABEL=Nix /nix apfs rw" | sudo tee -a /etc/fstab
# now, install nix
curl https://nixos.org/nix/install | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment