This is an automated archive made by the Lemmit Bot.
The original was posted on /r/nixos by /u/Creepy_Reindeer2149 on 2025-09-03 22:07:59+00:00.
We ofc love NixOS because “it you break it you can just roll back!”. But IRL I’ve had to reinstall from scratch multiple times because I was left with no viable generations.
If you experiment a lot you face a dilemma of either keeping 100s of GB of generations organized only by number OR risking the GC deleting your last working generation
The problem here is that gc keeps/deletes generations is based on recency rather than salience. This is a terrible data retention strategy.
I don’t want to delete certain stable generations just because they are X days old or because X generations have been created since that build. I want to keep certain configs no matter how old they are
Is there any way to have more sophisticated logic around what the gc deletes? I’d like to “pin” or save certain generations so that they will be kept around. And ideally have GC delete generations that I never booted into
And ofc I’m aware I could use an older config in version control, but it kind of defeats the point of this feature and it doesn’t help if I can’t login because the FDE decryption process is messed up for example