Skip to content

Keeping in sync (haus)

Once you’re set up, day-to-day life with nebelhaus runs through one command: haus. It wraps the Nix commands you’d otherwise type by hand — build, switch, update, roll back — with safe defaults.

Edit your config, then apply it:

Terminal window
haus edit # open your host file in $EDITOR
# …make changes…
haus rebuild # build first, then switch — a failed build never activates

haus rebuild always builds before switching, so a config with an error can’t take down your running system — you just see the build fail and fix it.

The rice lives upstream. To pull new versions:

Terminal window
haus update # bump the nebelhaus pin, then rebuild

This updates the flake.lock in ~/.config/nix to the latest nebelhaus and rebuilds in one step. Because inputs are pinned, nothing changes until you run this — your machine stays exactly as it was until you choose to move it.

Terminal window
haus rollback # atomically return to the previous generation
haus generations # list generations you can roll back to
haus doctor # health check: Nix, Xcode CLT, GUI agents, cask drift

Every switch creates a new generation; rollback steps back to the last one instantly. For macOS settings (not packages), the APFS snapshot the installer took is your coarser rewind.

CommandWhat it does
haus rebuildBuild, then switch — your everyday apply
haus updateUpdate the nebelhaus pin, then rebuild
haus rollback [N]Return to the previous generation (or generation N)
haus generationsList available generations
haus statusCurrent generation and how stale the rice is
haus editOpen your host file in $EDITOR
haus doctorDiagnose Nix / CLT / agent health and cask drift
haus btmOn macOS Tahoe+, diagnose Background Task Management blocks on nix login items

If you rebuild from a second Mac (or after shipping changes from elsewhere), just pull your config repo and rebuild:

Terminal window
cd ~/.config/nix && git pull
haus rebuild

Since everything is in git and pinned, the second machine converges to the exact same system.

For the deeper picture of why pins work this way, see How the flakes fit together.