Install Nix on macOS Catalina
Updated on: 18 Nov 2020
Recent changes by Apple to macOS have made that 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 -L https://nixos.org/nix/install) --daemon