Landing Headfirst
The foray into NixOS was painful, and while there wasn’t much I found for newcomer guidance here’s what would have helped me:
- Start small, use the installer on a real system or VM to build on
- Said differently, don’t start with a beefy configuration that will inevitably require troubleshooting
- Yes, this is obvious advice, but I could not resist the allure of creating a “perfect” configuration
- As of 2023-11, the installer did not play well with LUKS
- It is worth learning how to manually partition disks properly
- Make
/boot
large (5GB+), or don’t put it on a dedicated partition- I ended up needing to wipe and re-partition due to a full boot partition; a well documented issue that shockingly isn’t resolved in the installer
- When using
-p
to name generations, don’t use spacesnixos-rebuild
will happily give you the rope, invalid generations won’t be cleaned out by garbage collection and you’ll find yourself unable to upgrade with a full/boot
The following are a bit tongue-in-cheek that I have yet to do them as of this rambling:
- home-manager is probably worth it; excitement lies ahead refactoring a beefy
configuration.nix
ahead to make a 2nd device easier to onboard - Learning flakes are probably worth it; I’m told it solves all my problems from using Firefox Nightly, supporting multiple machines “easily”, and more
Context
This post was intended to share some lessons learned as I migrated from Fedora into something a bit more complex, but I realized the process was rather amusing and decided I’d share. Did I do everything right? Absolutely not, many mistakes were made and better choices are/were plentiful. Regardless, this was my journey into something new.
Fedora Issues
Fedora gifted me stability issues on my primary workstation, a safe haven of non-work productivity (perhaps more gaming than productivity). Friday night after the kids in bed ideally avoids steam crashing nonstop, intermittent full system freezes, a $6 beer in a frozen glass getting warmer on the desk, compadres in mumble impatiently waiting, and metaphorically tearing my hair out as I troubleshoot in desparation. Debian was installed in short order with Firefox, mumble, steam, and $currentDay
multiplayer game as a life raft to evening relaxation time. I found myself on Debian as a refugee while I plotted my next moves for a stable desktop operating system.
Installing NixOS
I prefer newer packages and enjoy shiny things, so while Debian is an excellent and stable distribution I wanted something more. I’d been poking around at NixOS for months as it interested me, but I wasn’t ready to gracefully dive in. I’d been slowly hacking away on a configuration I stole from a friend while incorporating things I found online. A virtual machine should have been the first step, but it wasn’t. Late one evening I decided to partition my boot disk to add NixOS and rebooted before I found out my partitioning skills were lacking. I accidentally nuked a part of the Debian installation, and decided instead it was time to jump in. A wipe/rebuild it is.
The installation was bumpy. Referring to the lessons learned above I should’ve started small as much of the pain was self inflicted from an untested config. After some wrangling I did get it running until I noticed the disk was never LUKS encrypted… after getting everything configured for the inaugural “big reboot”. Another wipe/rebuild it is.
A few days later I wiped it, manually partitioned the disk, and dd
’d over my image. I did not realize until after I tried booting I had forgotten the /boot partition. Another wipe/rebuild it is.
After yet another installation with LUKS working properly I ran into the infamous /boot
full issue. Another wipe/rebuild it is.
Current State
I am now a happy NixOS novice (if that) user. The packages are fresh, system is stable, and rollbacks have saved me multiple times. A Framework 16 system should be arriving in the next few months and NixOS should (TM) make that setup a bit easier.
The process resembled landing headfirst into a dry pool but I’ve since recovered more grizzled and (somewhat surprisingly) a happy “customer” with NixOS. Thanks Free Software!