A macOS environment managed declaratively with nix-darwin + home-manager + Homebrew.
The repo lives at ~/git/dotfiles, aliased to ~/.dotfiles.
One command applies the Nix-managed system settings, packages, and config: ~/.dotfiles/rebuild.sh.
| File | Layer | Owns |
|---|---|---|
flake.nix / flake.lock |
inputs | nixpkgs, nix-darwin, home-manager, nix-homebrew; the mac config |
configuration.nix |
system (nix-darwin) | macOS defaults, Touch ID sudo, fonts, additive 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 - Install Herdr directly so its built-in updater owns the executable:
curl -fsSL https://herdr.dev/install.sh | sh - Install the
themeswitcher, which cargo owns and Nix does not:git clone <bryces-theme-switcher> ~/git/bryces-theme-switcher cargo install --path ~/git/bryces-theme-switcher
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, additively via nix-homebrew.
The
brewsandcaskslists define a baseline that rebuilds install when missing. Rebuilds do not upgrade existing packages or remove undeclared ones, so applications can use their own self-updaters and ad hoc Homebrew installs remain intact. Use explicitbrewcommands for updates and removals.
User - home.nix (home-manager)
- Nix packages:
neovim,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).
- Herdr is installed directly in
~/.local/binand updated withherdr update, independently of Nix rebuilds. themeis built by cargo into~/.cargo/bin, independently of Nix rebuilds. It reads the Theme manifests inhome/.config/theme-switcher/; seeTOOLCHAIN.md.
There are two styles:
- Edit-in-place (
wezterm,tmux,nvim,herdr,theme-switcher): 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. Claude Code works the same way, but off~/.clauderather than~/.config: onlyhome/.claude/settings.jsonis linked, because the rest of that directory is runtime state. Claude Code writes its own settings back through the symlink, so changes made from inside a session land in the repo and show up as a diff. - 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)
home/.config/theme-switcher/ Theme manifests (edit-in-place)
home/.claude/settings.json Claude Code (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.