Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# 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 | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment