nix-config
My home server, desktop and phone, declared in one public repo. A deploy that fails undoes itself.
The constraint
Several machines and one person to look after them. A machine fixed by hand drifts, and nobody remembers how it got that way.
The decision
Every machine is described in one NixOS and home-manager flake, and the root filesystem keeps only the state that is declared. A machine is rebuilt from the repo instead of repaired by hand. Secrets and anything private live in a separate private repo.
The safeguard
If a service fails while a deploy activates, the whole deploy rolls back. A merge to main does not deploy by itself: I start each deploy, and coding agents never do.
The result
One commit describes every machine, and a bad deploy puts the last good one back.
The trade-off
The rollback is all or nothing: one failing service, even an unrelated one, undoes the whole deploy.