A macOS environment managed declaratively with nix-darwin + home-manager + Homebrew.
The repo lives at ~/git/dotfiles, aliased to ~/.dotfiles.
One command applies everything - system settings, packages, and config: ~/.dotfiles/rebuild.sh.
| File | Layer | Owns |
|---|---|---|
flake.nix / flake.lock |
inputs | nixpkgs, nix-darwin, home-manager, nix-homebrew, herdr; the mac config |
configuration.nix |
system (nix-darwin) | macOS defaults, Touch ID sudo, fonts, declarative Homebrew |
home.nix |
user (home-manager) | nix packages, zsh/fzf/starship, edit-in-place config links |
rebuild.sh |
apply | refreshes the ~/.dotfiles alias, runs darwin-rebuild switch |
- Install Determinate Nix (gives you
nixwith flakes). - Clone the repo and create the stable alias:
git clone <this-repo> ~/git/dotfiles ln -s ~/git/dotfiles ~/.dotfiles
- Apply everything:
~/.dotfiles/rebuild.sh
rebuild.sh runs darwin-rebuild switch --flake ~/.dotfiles#mac.
There is no manual symlinking - home-manager creates every ~/.config link.
The first run also enables Touch ID for sudo and adopts the existing Homebrew install.
System - configuration.nix (nix-darwin)
- macOS defaults: dark mode, fast key repeat, Dock, Finder, a Quick Note hot corner, natural-scroll off, and more.
- Touch ID for
sudo. - FiraCode Nerd Font via
fonts.packages(the way that actually registers a font with macOS). - Homebrew, declaratively via nix-homebrew with
cleanup = "zap". Thebrews/caskslists are the single source of truth: anything installed that isn't listed gets removed on the next rebuild. Add or remove CLIs and GUI apps by editing those lists.
User - home.nix (home-manager)
- Nix packages:
neovim,herdr,stripe-cli, … programs.zshgenerates~/.zshrc/.zshenv/.zprofile(history, aliases, completion, autosuggestions, syntax highlighting).programs.fzfandprograms.starship(starship readsstarship.toml).- Edit-in-place config symlinks (below).
There are two styles:
- Edit-in-place (
wezterm,tmux,nvim,herdr): the real files live underhome/.config/<tool>/, and home-manager symlinks them live into~/.config/. Edit the repo file and the change is immediate - no rebuild for config-only tweaks. - Declarative (
zsh,starship): generated by home-manager fromhome.nix(andstarship.toml). Change those, then runrebuild.shto apply.
flake.nix / flake.lock the flake and its pinned inputs
configuration.nix system layer (nix-darwin)
home.nix user layer (home-manager)
rebuild.sh apply script
starship.toml prompt config (imported by programs.starship)
home/.config/wezterm/ WezTerm (edit-in-place)
home/.config/tmux/ tmux (edit-in-place)
home/.config/nvim/ Neovim, vendored (edit-in-place)
home/.config/herdr/ herdr (edit-in-place)
iterm2/ iTerm2 prefs + color preset (legacy/backup)
TOOLCHAIN.md Node / Python / CLI toolchain notes
CHEATSHEET.md terminal + tmux + Neovim usage
Vendored from a kickstart.nvim fork into home/.config/nvim (kickstart was just the starting point).
The neovim binary comes from nix; nvim-pack-lock.json is tracked so plugin versions are pinned and reproducible.
iterm2/com.googlecode.iterm2.plist is version-controlled via iTerm's custom-preferences-folder feature.
Kept as a fallback; WezTerm is the daily driver.