NOTE: how to install Nix package manager on MacOS Catalina

WARNING: This should no longer work, refer to https://hydra.nixos.org/build/119559243/download/1/manual/#sect-macos-installation

Since MacOS Catalina adds some new rules, root path cannot be used by applicatin now, caused Nix package manager cannot work! The problem is Nix stores all data in /nix this path. Unfortunately, Catalina disallows that. To solve thi s HeI write this note for solution.

From zetavg's comment:

# Create a volume for the nix store and configure it to mount at /nix.
wget https://raw.githubusercontent.com/LnL7/nix/darwin-10.15-install/scripts/create-darwin-volume.sh
bash create-darwin-volume.sh
# The following options can be enabled to disable spotlight indexing of the volume, which might be desirable.
sudo mdutil -i off /nix
# Hides the "Nix Store" disk on Desktop, need to relaunch Finder to see effect. Will not be necessary after the PR comment https://git.io/Jv2xT is accepted.
sudo SetFile -a V /nix

Probably a better one? https://hackmd.io/[cite/t:@z/nix-store-macos-tm-recover]

Thanks zetavg!

Date: 2020-04-17 Fri 00:00

Author: Lîm Tsú-thuàn