This repo holds my system config, which as of April 2025, is macOS.
It uses:
- nix-darwin
- Emacs
- Others:
- Homebrew
- WezTerm
- Zsh
- Tmux
-
Install Homebrew
-
Install Nix using Determinate Nix Installer:
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate-
Clone this repo into
~/src/systemand cd to it -
Install nix-darwin
sudo nix run nix-darwin/master#darwin-rebuild -- switch
- Use nix-darwin
darwin-rebuild switch --flake .#deucalion
This will create a symlink
/etc/nix-darwin -> ~/src/system/nix-darwin, so it's possible to rundarwin-rebuild switchthe next time.
- All tooling config files are symlinked and not managed by nix-darwin (or home-manager)
- List generations
darwin-rebuild --list-generations
- Rollback to previous generation
darwin-rebuild switch --rollback
- Run garbage collection manually
nix-collect-garbage
or a more aggressive garbage collection (removes old generations)
sudo nix-collect-garbage -d
- Clean up leftover generations older than 7 days with
nix-collect-garbage --delete-older-than 1d
Rebuild current config after a GC run:
darwin-rebuild switch