Install Nix on macOS Catalina

Recent changes by Apple to macOS have made the operating system less compatible with software designed for Unix, including Nix. Here is how to work around the changes to install Nix on macOS 15 (Catalina).

echo 'nix' | sudo tee -a /etc/synthetic.conf
reboot # Actually reboot your Mac.
sudo diskutil apfs addVolume disk1 APFSX Nix -mountpoint /nix
sudo diskutil enableOwnership /nix
sudo chflags hidden /nix
echo "LABEL=Nix /nix apfs rw" | sudo tee -a /etc/fstab
sh <(curl https://nixos.org/nix/install) --daemon

Software Development Mastermind

Software Development Mastermind