Pinning NixOS generations to the commits that built them

10 days ago by ikskoder to c/nix

How each NixOS generation can name the commit that built it, and keep that commit through a history rewrite.
rozodru 8 points 10 days ago

never really had the issue where I don't know what commit is tied to what generation. add to the fact I might roll back once in a blue moon and if it does require a roll back I already know why I have to roll back.

That being said this is neat, I like it, but I think it's overblown for a minimal issue.

path: 0 26261820, hotness: undefined, score: 8, children: 1
ikskoder 4 points 10 days ago

Fair point) It really depends on how you use your system. If I weren't constantly tweaking things, I don't think it'd be an issue for me either.

In my case I also use Home Manager as a NixOS module, so every home config change is a system rebuild too, and I'm at almost a thousand generations by now. When I'm trying out something new I can hit up to 50 rebuilds in a day (rare, but it happens), and that's exactly when it becomes a problem.

So yeah, for a lot of people this is definitely overkill, but for others (similar to how I use it) it can save a lot of digging.

path: 0 26261820 26264165, hotness: undefined, score: 4, children: 0

go to feed...