Nix-managed macOS setup: nix-darwin (system) + home-manager (user) + nixvim (nvim), one flake at the repo root.
- Install Xcode Command Line Tools and the Determinate nix installer:
curl https://install.determinate.systems/nix | sh -s -- install - Enroll Touch ID, install 1Password and sign in with CLI integration enabled.
- Clone this repo anywhere, then set the
uservariable inflake.nixto the local account name. - Register the flake for default discovery, so bare
sudo darwin-rebuild switchresolves it (darwin-rebuild looks for /etc/nix-darwin/flake.nix and uses the machine hostname as the configuration attribute):sudo mkdir -p /etc/nix-darwin sudo ln -s ~/dotfiles/flake.nix /etc/nix-darwin/flake.nix - Activate everything - one time only:
nix run "github:LnL7/nix-darwin/nix-darwin-26.05#darwin-rebuild" -- switch --flake ~/dotfiles#stardusty - Set up rtk for Claude Code - installs the PreToolUse hook that routes
Bash calls through the token-saving proxy, then restart Claude Code:
rtk init -g
The bootstrap command follows the nix-darwin release branch and never needs
updating; the system it activates is fully pinned by flake.lock.
sudo darwin-rebuild switch
applies system + home-manager changes; no flake flag needed (it is discovered
via /etc/nix-darwin/flake.nix, and the configuration is named after the
machine hostname). To bump versions, run nix flake update in the repo root
first.
The whole repo is flake source, so edits to tracked files (.nix configs and
root dotfiles alike) are picked up from the working tree on the next switch.
Untracked files are invisible to nix until git added; commit new dotfiles
before deploying them.
Format with nix fmt -- flake.nix nix/*.nix (nixfmt; nix 2.25 forwards only
the given file args to the formatter, so the paths must be explicit).
flake.nix- inputs (nixpkgs, home-manager, nixvim, nix-darwin) and the "stardusty" configuration (named after the machine hostname)nix/home.nix- packages, zsh, git, bat, fzf, launchd agents, dotfile linksnix/nvim.nix- the entire nvim configuration (nixvim)nix/aerospace.nix- AeroSpace config (TOML-serialized settings + module-managed launchd agent)nix/tmux.nix- tmux config with the Catppuccin Frappe theme (declarative plugins via home-manager)nix/wezterm.nix- WezTerm config (lua via programs.wezterm)nix/darwin.nix- system config: Touch ID sudo, weekly store maintenancenix/opensuperwhisper.nix- OpenSuperWhisper.app packagenix/mole.nix- mole CLI package (tw93/mole, source-built; bump the version + hashes to update)
Note: the nix daemon and /etc/nix/nix.conf are managed by the Determinate
installer, not nix-darwin; store gc/optimise run as plain launchd daemons
(Sundays 02:30 / 03:00).