Moving to a new Mac
This is the payoff for describing your machine as text: a new Mac (or a wiped one) is a restore, not a weekend of clicking through System Settings. Your config is in git; you point a fresh machine at it and it converges to the exact same system.
A few things live outside Nix on purpose — secrets, keychain trust, hardware keys. Those are the manual bits, and they’re a short, honest checklist.
The happy path (you already have a nebelhaus config)
Section titled “The happy path (you already have a nebelhaus config)”If your ~/.config/nix is pushed to git somewhere, restoring is two moves:
-
Point the installer at your config. The same one-liner that scaffolds a fresh setup also restores an existing one — it installs the Xcode CLT and Determinate Nix if they’re missing, then clones your repo into place and skips the interview entirely:
Terminal window curl -fsSL https://nebelhaus.com/init.sh | bash -s -- --from <your-config-remote> -
Build, then switch:
Terminal window cd ~/.config/nixnix build .#darwinConfigurations.$(scutil --get LocalHostName).system \&& sudo ./result/sw/bin/darwin-rebuild switch --flake .
(Prefer doing it by hand? xcode-select --install, install
Determinate Nix, and git clone your
config to ~/.config/nix — that’s all --from does.)
That first build downloads the world and takes a while; after it, haus is on
your PATH and the machine is yours again.
What comes back on its own
Section titled “What comes back on its own”Once that switch finishes, the rebuild has already restored:
- Every declared GUI app — anything with a
caskin your roster or inhomebrew.casksreinstalls itself. - Your whole shell — Ghostty, zellij, zsh, starship, yazi, helix, and the CLI toolbelt, themed and configured.
- All your CLI tools from
home.packages. - The macOS defaults the rice manages (Dock, Finder, trackpad, key repeat, the Caps-Lock remap, ⌘Space).
- The background agents — tiling, the bar, and the launcher, launched via launchd so they survive the next cold boot.
The manual bits Nix doesn’t carry
Section titled “The manual bits Nix doesn’t carry”By design, a handful of things never enter your Nix config. Walk this list once on a fresh machine:
-
Secrets. Copy your
~/.secrets/*files over securely (AirDrop, a password manager, an encrypted drive). They’re git-ignored on purpose, so they don’t ride along in the clone. -
Commit signing keys. If you sign commits, import your GPG/SSH key material and set up
gpg-agent+pinentry-mac(or your YubiKey). The key id is in your config; the key material is not. -
Pounce’s Accessibility grant. macOS ties this to the machine, so re-grant it once:
Terminal window pounce --request-accessibilityIf you use
nebelhaus.pounce.signingIdentity, make sure that signing certificate is in the new machine’s keychain (import it, or create a fresh Apple Development cert and update the SHA-1 in your host file) so the grant survives future rebuilds. See Pounce config. -
Apps outside the config. Anything you installed by hand won’t reappear — reinstall those, and consider moving the ones you care about into your config (a cask or
masApps) so next time they do. -
App logins & licences. Nix restores the app; it can’t restore your session. Sign back into the handful of apps that need it.
Coming from a hand-configured Mac
Section titled “Coming from a hand-configured Mac”Not restoring — adopting nebelhaus on a Mac you’ve already set up by hand? The install flow is built for exactly that, and it’s careful:
- Your Homebrew casks are kept. The preflight audit lists what it sees; nothing is removed.
- Dotfiles are backed up, not clobbered — anything the rice manages gets a
.backupcopy first. - Your current macOS settings can be captured into your new host file, so the switch doesn’t fight preferences you already like.
- The interview collects your name, email, accent, editor, and which rooms
you want — then scaffolds
~/.config/nixand commits it. Nothing activates until you run the build command it prints.
Then it’s the normal first run, and from there everything on Making it yours applies.
Where to go next
Section titled “Where to go next”- Making it yours — now that it’s back, tune it.
- Keeping in sync — keep this machine and the next one converged.
- How the flakes fit together — why pinning makes any of this reproducible.
- Leaving nebelhaus — the reverse trip, when you want to remove a room or take the whole house down cleanly.