Declarative macOS setup with Nix, nix-darwin, and home-manager.
git clone https://github.com/hidapple/mac-provisioning.git
cd mac-provisioning
sh setup.sh work # or: sh setup.sh privatesetup.sh installs Nix (Determinate Systems installer), applies the nix-darwin
configuration, links the dotfiles, and prompts for the git name/email.
After the first run, re-apply changes with:
sudo darwin-rebuild switch --flake .#workTwo machines, differing only by username (set in flake.nix):
work—s-hidaprivate—shoheihida
| Path | Role |
|---|---|
flake.nix |
Inputs and the two darwin configurations |
darwin/configuration.nix |
System: packages, fish, macOS defaults |
home/home.nix |
User: mise (home-manager) |
setup.sh |
Bootstrap: Nix install → switch → dotfiles |
CLI tools and macOS settings are managed here. Dotfiles (fish, vim, tmux,
ghostty, hammerspoon, git) live in a separate repo
(hidapple/dotfiles) and are linked by
its own link.sh, run from setup.sh.
- Grant Accessibility to Hammerspoon (System Settings → Privacy & Security → Accessibility) for its window hotkeys.
- nvim: run
:PlugInstallon first launch. - GUI apps (Chrome, Ghostty, …) are installed manually.
- git identity (name/email) stays out of any repo: it lives in
~/.config/git/config.local, generated bysetup.sh. - Change settings like key repeat or pointer speed in
darwin/configuration.nix, not in System Settings — manual changes there conflict with the declarative config and are overwritten on the next switch.