macOS setup via Nix flakes, nix-darwin, and home-manager.
| Path | Purpose |
|---|---|
flake.nix |
Flake inputs/outputs (darwinConfigurations.ava, homeConfigurations.ava) |
darwin.nix |
System: Homebrew casks, fonts, system.defaults |
home.nix |
User: shell, CLI, programs.* configs |
.config/nvim |
LazyVim, mutable symlink into ~/.config/nvim |
.config/htop |
htoprc dir, mutable symlink into ~/.config/htop |
.config/sketchybar |
Status bar config, mutable symlink into ~/.config/sketchybar |
.config/karabiner |
Manually-synced backup (see below) |
.config/bat/themes |
TokyoNight theme read by programs.bat |
.p10k.zsh |
Powerlevel10k config, linked to ~/.p10k.zsh |
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"git clone https://github.com/<you>/dotfiles ~/dotfiles
cd ~/dotfileshome-manager won't clobber existing files. Either delete them or:
for f in ~/.zshrc ~/.p10k.zsh ~/.config/ghostty/config ~/.config/tmux/tmux.conf \
~/.config/bat/config ~/.config/yazi/yazi.toml ~/.config/aerospace/aerospace.toml \
~/.config/git/config ~/.config/git/ignore ~/.config/gh/config.yml; do
[ -e "$f" ] && [ ! -L "$f" ] && mv "$f" "$f.pre-nix"
done
for d in ~/.config/nvim ~/.config/htop ~/.config/sketchybar; do
[ -e "$d" ] && [ ! -L "$d" ] && mv "$d" "$d.pre-nix"
doneOr pass -b backup to the switch command to auto-rename.
nix run nix-darwin/master#darwin-rebuild -- switch --flake ~/dotfiles#avaNo sudo — darwin-rebuild escalates internally.
- Grant Accessibility/Input Monitoring to: Karabiner, AeroSpace, Homerow
- Grant Screen Recording to: OBS
gh auth login
darwin-rebuild switch --flake ~/dotfiles#ava # after any edit
home-manager switch --flake ~/dotfiles#ava # user-only, faster
nix flake update && darwin-rebuild switch --flake ~/dotfiles#ava # update inputs
darwin-rebuild switch --flake ~/dotfiles#ava --rollback # undo- CLI or darwin-packaged GUI →
home.packagesinhome.nix .app-only GUI →homebrew.casksindarwin.nix- macOS setting →
system.defaultsindarwin.nix - Shell alias →
programs.zsh.shellAliasesinhome.nix - Raw config file →
home.file/xdg.configFile - Mutable in-repo config dir → add to
linkMutableConfigDirsinhome.nix
- LazyVim:
.config/nvimis a mutable symlink back to this repo.lazy-lock.jsonis committed — let LazyVim update it, then commit. - Karabiner: rewrites
karabiner.jsonatomically, which breaks symlinks, so it's not auto-linked. After meaningful changes,cp ~/.config/karabiner/karabiner.json ~/dotfiles/.config/karabiner/. On a fresh Mac, reverse the copy with Karabiner quit. - Ghostty: Homebrew cask (nixpkgs build is Linux-only); config via
programs.ghostty. - Sketchybar:
.config/sketchybaris a mutable symlink back to this repo (like nvim). Installed as a brew from theFelixKratz/formulaetap (auto-trusted via~/.homebrew/trust.json, seeded indarwin.nix) and started by AeroSpace on login (brew services start sketchybar). If the bar doesn't appear, run that manually orsketchybar --reload. - Node:
fnmwith--use-on-cd, honors.nvmrc.