Hey, I’ve been asking in the IRC about this and I feel my trouble, at least in part, stems from having a bad mental model of how nix works so I figure this is worth being a (searchable) post.
Things I did:
- Got a new laptop half a year ago, set up NixOS and bare minimum of tools (already had a configuration from another computer).
- Didn’t update or change anything for a few months (~3) everything is smooth like butter.
- Finished school (I now have a degree :^) and started the process of tailoring my system with trying to upgrade to 19.03. I figured nothing could really go wrong since I could rollback and just tried to
nixos-rebuild switch --upgradestraight out the gates.
- System broke, most of the services couldn’t restart on the fly and I had no internet etc. Rebooting into the new generation didn’t fix things. Also the new generation was still 18.09. For the same reason my immediate attempt to switch with rollback also had everything broken.
- Boot into the old generation and start reading what I should have done,
nix-channel --listis just empty, so it seems I wasn’t on any channel when I did the upgrade.
- Add the stable 19.03 channel and do a
nix-channel --updateand try to rebuild the system several times, both with
nixos-rebuild bootbut no bueno.
The problem as I perceive it is that I can’t delete or overwrite the initial (failed) new generation. This is because every time I rebuild or try to upgrade (whether it is after having rolled back to the working system or while having the new generation as current) the timestamp doesn’t get updated and the version number doesn’t get bumped (eventually I tried changing the version in
configuration.nix but still no change). My diagnosis is that nix is trying to reuse the work done by the first update and so what I want to try is a clean slate (i.e. delete the new generation so that the update will link to the last working system).
Another way to approach it is to assume that everything is building fine but that plasma is broken in 19.03 (since the bar and the desktop background crashes when I boot into it, but at this point I do have working internet at the very least) but that doesn’t explain the timestamp + version number phenomena. If it’s really just an issue with plasma then I don’t care since I am changing my WM anyway, but I’d like to be sure, so any help with understanding what is happening under the covers would be greatly appreciated.
Okay thank you and sorry about the unnecessary details (and maybe lack of necessary details )