37
submitted 1 month ago* (last edited 1 month ago) by ikskoder@programming.dev to c/nix@programming.dev

Tired of rolling back to an old NixOS generation and having no idea which commit it was built from? Here's how to fix that: ikskoder.dev/blog/nixos-generations-git-commits

top 2 comments
sorted by: hot top new old
[-] rozodru@piefed.world 8 points 1 month 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.

[-] ikskoder@programming.dev 5 points 1 month 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.

this post was submitted on 10 Oct 2026
37 points (100.0% liked)

Nix / NixOS

2949 readers
21 users here now

Main links

Videos

founded 3 years ago
MODERATORS