Skip to content

Repository files navigation

dotfiles

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.

How it's organized

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

Bootstrap on a new machine

  1. Install Determinate Nix (gives you nix with flakes).
  2. Clone the repo and create the stable alias:
    git clone <this-repo> ~/git/dotfiles
    ln -s ~/git/dotfiles ~/.dotfiles
  3. Apply everything:
    ~/.dotfiles/rebuild.sh
  4. Install Herdr directly so its built-in updater owns the executable:
    curl -fsSL https://herdr.dev/install.sh | sh
  5. Install the theme switcher, 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.

What manages what

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 brews and casks lists 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 explicit brew commands for updates and removals.

User - home.nix (home-manager)

  • Nix packages: neovim, stripe-cli, …
  • programs.zsh generates ~/.zshrc / .zshenv / .zprofile (history, aliases, completion, autosuggestions, syntax highlighting).
  • programs.fzf and programs.starship (starship reads starship.toml).
  • Edit-in-place config symlinks (below).
  • Herdr is installed directly in ~/.local/bin and updated with herdr update, independently of Nix rebuilds.
  • theme is built by cargo into ~/.cargo/bin, independently of Nix rebuilds. It reads the Theme manifests in home/.config/theme-switcher/; see TOOLCHAIN.md.

Editing configs

There are two styles:

  • Edit-in-place (wezterm, tmux, nvim, herdr, theme-switcher): the real files live under home/.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 ~/.claude rather than ~/.config: only home/.claude/settings.json is 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 from home.nix (and starship.toml). Change those, then run rebuild.sh to apply.

Layout

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

Neovim

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 (legacy / backup)

iterm2/com.googlecode.iterm2.plist is version-controlled via iTerm's custom-preferences-folder feature. Kept as a fallback; WezTerm is the daily driver.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages