- Install Nix:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
- Install nix-darwin
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A uninstaller
./result/bin/darwin-uninstaller
rm result
-
Modify the files in this directory
-
Initial setup
nix run nix-darwin -- switch --flake .
Done.
If you change the contents of this directory
git add .
nix run nix-darwin -- switch --flake .
To update packages
nix flake update
git add .
nix run nix-darwin -- switch --flake .
To remove old generations
nix-collect-garbage --delete-older-than 7