hausfold

haus

Leaving

Switch off one room, roll back a generation, or take the whole house down. Each exit in turn, smallest first.

haus is opinionated, not possessive. Switching off one room, returning to an earlier generation, removing the system layer and removing Nix are four operations of very different sizes. Start with the smallest one that solves your problem.

What you wantWhere to go
Undo the last rebuildRoll back a generation
Undo the macOS settings a rebuild movedhaus revert-settings (below)
Stop using tiling, the bar, the launcher, the shelfSwitch off a room
Remove the managed system, keep NixTake down the system layer
Remove Nix itselfRemove Determinate Nix

Keep your config before you remove anything

~/.config/nix is your machine described in text, not generated state. Archive it first; a git remote is better, if it holds no secrets.

cp -R ~/.config/nix ~/.config/nix.archive

Roll back a generation

Every successful switch makes a generation, and stepping back to one takes seconds:

haus generations         # what you can go back to
haus rollback            # the previous one
haus rollback <number>   # a specific one

That restores everything Nix wrote: packages, agents, shell config, paths. It does not touch macOS's own preferences, which a rebuild sets imperatively: the Dock, Finder, the keyboard, the menu bar, file associations. Those have their own pair of commands:

haus capture              # snapshot the live settings before a risky change
haus revert-settings      # put the last snapshot back, byte for byte
haus revert-settings list # every snapshot you've taken

If you never captured one, System Settings is the way back.

The wallpaper is the sharpest case. haus.wallpaper.style defaults to minimal, so the desktop is stamped at every activation and macOS keeps no record of the picture that was there before. Rolling back doesn't bring yours back: re-pick it in System Settings and set haus.wallpaper.style = "none", or the next rebuild stamps over it again.

Switch off a room

Every room comes out independently, and the rest of the machine keeps working:

{
  haus.prowl.enable = false;   # AeroSpace tiling, the Caps-Lock leader, window bindings
  haus.sill.enable = false;    # SketchyBar: the top bar, and the bottom one if you run it
  haus.pounce.enable = false;  # the launcher daemon, ⌘Space, its Accessibility features
  haus.perch.enable = false;   # the notch file shelf, see the residue note below
  haus.hush.enable = false;    # the quiet switch: its bar pill, palette command and CLI
  haus.collar.enable = false;  # Touch ID for sudo, back to the password prompt
}
haus edit
haus rebuild

The native menu bar comes back on its own: haus rewrites that key at every activation, so switching sill off is enough. Caps Lock comes back too, but on the next restart: the remap is a hidutil property that lasts until you reboot, so the session you rebuilt in keeps it. Spotlight's ⌘Space doesn't: pounce disables that shortcut with a one-way write and nothing turns it back on, so re-enable it in System Settings ▸ Keyboard ▸ Keyboard Shortcuts. hush leaves the reverse kind of trace: a Do Not Disturb chord bound onto a shortcut macOS ships disabled, which stays bound until you clear it.

Customize a desktop has the full table, plus the middle ground where prowl keeps tiling but gives your keys back.

Take down the system layer

This removes nix-darwin's system integration and leaves Nix installed for everything else that uses it. Run nix-darwin's own uninstaller:

sudo nix --extra-experimental-features "nix-command flakes" \
  run nix-darwin#darwin-uninstaller

If that can't run, try the locally installed copy: sudo darwin-uninstaller. Read the plan before confirming. It removes the managed system links, static files and launchd services, then restores the Nix daemon the installer supplied. Restart the Mac when it finishes.

Your config isn't made useless by this. Keep it if you might come back, or move it out of the active path with mv ~/.config/nix ~/.config/nix.archive.

Put your own dotfiles back

Home Manager preserves a conflicting file with a .backup suffix rather than clobbering it, so the file you had before the install is usually still there:

find "$HOME" -maxdepth 5 -name '*.backup' -print

Typically ~/.zshrc.backup, ~/.zshenv.backup, ~/.config/starship.toml.backup, ~/.config/git/config.backup, plus some inside managed directories. Inspect each one, confirm the Nix-managed target is gone, then move it back by hand. One exception to hunting for: zellij's config.kdl.backup is cleared on every rebuild by design, so it won't be there.

Don't restore blindly. A backup is the version that existed at the first conflict, which may be years older than what you'd want today.

Apps stay yours

haus never removes an app just because it left your config: haus.homebrew.cleanup is "none". Compare what you declared against what Homebrew actually owns, and remove only what you no longer want:

brew list --formula
brew list --cask
brew uninstall <formula>
brew uninstall --cask <cask>          # add --zap to take its data too

Pounce installed on its own

If you installed the launcher through Homebrew rather than as a haus room (removing the room is just haus.pounce.enable = false above):

brew services stop pounce
brew uninstall pounce
brew untap hausfold/tap
brew untap nebelhaus/tap   # only if you installed before the org was renamed

Homebrew keys a tap by its directory, so an install that predates the rename leaves the old one behind unless you untap it by its old name. Your own commands and config live in ~/.config/pounce; keep or archive that separately, and remove Pounce from System Settings ▸ Privacy & Security ▸ Accessibility if it's still listed.

Remove Determinate Nix

Only after the system layer is down

Removing Nix affects every Nix-managed project and tool on the Mac, not just haus.

The Determinate installer ships its own uninstaller. Read the plan before confirming, and restart when it's done:

sudo /nix/nix-installer uninstall

If it fails, follow Determinate's current macOS uninstall guide rather than deleting pieces of /nix by hand.

What to check afterwards

No uninstaller can promise to reconstruct every preference that existed before an install. haus revert-settings is the real answer if you captured a snapshot; this list is for when you didn't:

  • the Dock's autohide, position, size and animations
  • key repeat, press-and-hold, and the trackpad's tap-to-click and three-finger drag
  • Finder's extensions, hidden files, path bar and view style
  • hot corners
  • the native menu bar and its clock, and Caps Lock
  • Spotlight's ⌘Space, which never comes back on its own, and the Do Not Disturb chord hush bound, which stays bound
  • the wallpaper
  • where screenshots land and in what format, and the screen-lock delay
  • alert volume and the startup chime (that one is firmware, and survives a reinstall)
  • your keyboard input sources: haus declares them exhaustively, so layouts you never listed were switched off
  • the application firewall
  • file associations, if haus.hearth.hijackFileAssociations was on
  • the launcher's Accessibility grant, and Touch ID for sudo, including the passwordless-sudo rule for rebuilds, which is the one with a security consequence

The installer takes an APFS snapshot before it starts, but macOS purges local snapshots within about a day, so by the time you're reading this it has almost certainly gone. Treat it as luck, not as a plan.

Then confirm what's actually gone:

command -v haus || echo "haus is no longer on PATH"
command -v darwin-rebuild || echo "darwin-rebuild is no longer on PATH"
launchctl list | grep -Ei 'hausfold|nebelhaus|pounce|aerospace|sketchybar|sill|hush|sleepwatcher'

That pattern matters: haus runs more agents than the obvious three, under three different label prefixes, and a narrower grep reports a clean machine while the bottom bar and the hush watcher are still loaded.

A surviving AeroSpace or SketchyBar process isn't automatically residue: both are Homebrew installs that haus only launches, so brew uninstall is what actually removes them. And a few things nothing has a removal path for: an activation step copied the shelf app into place, and state directories are written as the machine runs, so no uninstaller takes either away:

ls ~/.local/state/haus ~/.local/state/nebelhaus ~/.local/state/pounce ~/.config/perch /Applications/Perch.app

If something stays behind

A departure that doesn't complete is a bug worth reporting. Open an issue with your Mac model and macOS version, whether Nix existed before haus, the path you followed, the exact command and its output, and what remained. Strip tokens, keys and personal files out of anything you paste.

On this page