/nix-darwin

My MacOS nix setup

Primary LanguageNix

Rail's Darwin Nix setup

How to install

  1. Install Nix:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
  1. Install nix-darwin
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A uninstaller
./result/bin/darwin-uninstaller
rm result
  1. Modify the files in this directory

  2. 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