I wiped my computer and installed nixOS from a USB image using the installation GUI. I love nixOS with gnome. I worked for weeks trying to learn nixOS to make my configuration.nix the way I wanted it. After every change and build using a new configuration.nix I rebooted. I have about 90 generations now.
Every few days I would randomly do a build with the --upgrade flag.
I have 90 generations listed at boot, with kernel versions from 6.1.60 to 6.1.63.
Generation 20 is the last generation with 6.1.61
My bitwarden package (GUI app) and twilio authy (GUI app) fail for Kernels higher than 6.1.61 i.e. generation higher than 20.
So I want to go back to that kernel 6.1.61 in generation 20 because I use the bitwarden app every 10 minutes on my machine and without a proper password manager I cannot use any computer. That app is a sine qua non
If I roll back to generation 20 and want to change my configuration.nix then I have to do a build. The build then takes the kernel 6.1.63 that was created when I did the most recent --upgrade at generation 80 or so. Then my bitwarden GUI fails… as the kernel is 6.1.63 . So I am stuck in a catch 22.
I need the machine to do a rebuild using the present kernel for the generation I have booted to - only that way can I crawl back up the rabbit hole and undo for ever my upgrade that messed up my Bitwarden package (because that package is perhaps not rolled out for that kernel yet, who knows…).
This aim seems to be impossible or at least mega non-trivial to do via the configuration.nix . Yes, one can in theory make a flake/overlay to force bitwarden to use a different kernel but that is a massive investment in the steepest part of the learning curve and I am far lower down it at the moment.
So I am reinstalling by nixOS from the USB image which led to generation 1, and uses the kernel lower than 6.1.61, and copying my current configuratoin.nix into the resulting install; and making a mental note NOT TO DO --upgrade at rebuild.
QUESTION 1: is this re-install from USB image to revert the kernel a crazy step, or a sensible least complex solution for a newbie like me?
PLAN: I intend to save a nixOS bootable images for each kernel version I use (starting at 6.1.61) so that if an --upgrade causes a kernel change and messes up packages that are unknowingly not compatible, then I can roll back by brute force and re-install from scratch.
QUESTION 2: is this plan of hamstering nixOS images for each kernel version used before I perform an --upgrade to, bonkers, or a standard thing ?
Irrelevant background remarks:
I have no data on the machine - so I do not need to restore anything else yet. I am just trying to test nixOS to see if it’s stability and reliability can persuade me not to buy an macOS machine for myself.
The test consists of installing all the software I have on my wife’s macOS and Anroid devices as best I can using configuration.nix to make it how I need it, even to make a timemachine backup alternative, and if they all seem to work - bingo, I can live on planet FOSS.
Long-term I want to put the configuratoin.nix onto a linux phone and ditch even Android.
Grumble: I thought nixOS rollback was a rollback of the entire system, kernel and all, but seem to have found that a rollback is not a time machine as regards the kernel.