Based on https://gist.github.com/jmatsushita/5c50ef14b4b96cb24ae5268dab613050
Note:
Currently my username bnrwrr
is hardcoded in the config in multiple places.
You should replace these with your own username.
Install Nix
Install Homebrew for packages not in Nixpkg.
Note: We manage Homebrew packages with Nix Darwin config but need to install it separately.
Copy this repo to ~/.config
For building the config the first time, run
cd ~/.config/nix-darwin
nix build .#darwinConfigurations.macbook-air.system
./result/sw/bin/darwin-rebuild switch --flake .
Note:
macbook-air.system
is the hostname of my system.
You should replace it with your hostname in flake.nix and the command above.
For future updates, you can use the alias update
defined in the zsh config.