NixOS 3
Continuing the story about migrating to NixOS
Part 3. The migration itself.
Interestingly, I only use USB flash drives to install a new OS; the rest of the time I don't need them. So for the second time in 5 years I dusted one off and flashed the NixOS image onto it with dd. At least it wasn't a CD-R, like I had to do 15 years ago 👽
I booted up, clicked next, next, next... and things got going. About 20 minutes later I rebooted into the fresh OS and started getting it into working shape based on the previously created configuration code. By the way, I found it convenient to keep the configuration.nix and home.nix files in my own git repository. And to automatically apply the changes I made, I created a Makefile with a make install-switch rule that copies the config sources from the local repo to the right place, namely /etc/nixos/, and then invokes the system rebuild command.
An important point: even though in case of problems you can boot from an older system configuration by selecting an entry in the bootloader, you still need to think about being able to roll back the configuration file itself, so that you can have a working config at any moment. And git is perfect for exactly that.
Next comes the fairly ordinary process of minor tuning and verifying that all the important utilities work, after which you get the perfect system for work 🤌.
By the way, an observation: the laptop's battery life even went up a little. But I'd attribute that to the newer kernel rather than to the system settings as such. Although the absence of constant attempts to update something, which Ubuntu was guilty of, is certainly a welcome change.
A couple of weeks later I repeated the operation on the second laptop, and with that the main part of the work can be considered done!