Hacker News new | ask | show | jobs
by jak0 104 days ago
That's a real scenario and it's happened to me. The key is that NixOS keeps every previous generation — so when I discover program #12 is broken, I can nix store diff-closures to see exactly what changed between generations, or just boot into the last known-good generation from GRUB. In practice I do two things: I keep a quick smoke-test habit after rebuilds (open a couple of the less-used apps), and the git history tells me exactly which .nix change touched what. Since every rebuild is a commit, git bisect works on your OS the same way it works on code. It's not perfect — I've definitely had the "wait, when did this break?" moment. But the recovery path is always under a minute, which makes the cost of experimentation very low.
1 comments

Can those smoke tests be included as part of the build?

You could build up a test suite of example workflows that run on every build.

Yes absolutely! Please have a look at my nixos-config I really would love to get feedback from others
For sure that is possible.