My journey with NixOS is now 6 months old. In this post, I'd like to think back on this time and reflect what my experience has been like, what I have learned, and what I still haven't learned.

For the curious, this is my current config: https://github.com/skogsbrus/os. Probably not an inspiration on how to structure your configs (yet!), but it might serve as a reference if you find anything there interesting.

Intro

The story began by installing NixOS on an old & unused laptop, to get a feel for it (Converting to NixOS). I think the installation and my first commit took a few hours to get done, which in my mind was not a big deal.

After a few weekends of tinkering, I was sold on the promises of the OS. My vacation was coming up, and so I made the switch on my work PC as well.

From there I've taken things slowly, adding things incrementally.

Flakes

In July 2021, I switched to using flakes (an upcoming Nix feature) for my OS config. I was persuaded by community discussions, specifically regarding the pros about pinned dependencies vs channels, and a desperate desire for installing nightly neovim. It took some work getting my config flake:ified, but there hasn't been any mental overhead of using flakes since - so I do think it was worth it!

In hindsight it seems like a rather small change, but I remember struggling a lot with flake:ifying my system because I really didn't know what I was doing. I relied completely on documentation and other people's published configs, understanding the general gist of what I was doing but not the syntax.

Adding another machine to the swarm

This was a giddy experience, almost at the same level as my first fascination of the OS. Until just last week, I was using NixOS on only one system (my work PC).

With practically no effort (except for getting dual-boot to work, which meant switching my Windows installation from legacy boot to UEFI), I installed the same system on my home workstation as on my work PC. It really felt incredible to do in under an hour what has previously taken my weeks of "Oh right, I've forgotten to install X".

Not only are my dotfiles synced, but applications, system settings, and gnome settings (keyboard shortcuts, extensions, themes) are too. It's such a weight off my shoulders to only have to care about keeping one configuration up to date.

Standing on the shoulders of giants

In my relatively simple workflows, NixOS has yet to stop me from getting work done. If anything, making dotfiles management simpler has actually helped me!

I largely think this is a great thing - the ecosystem is mature enough that I, as a user, barely have to know the language or internal details in order to configure my systems.

However, this "ease of use" (ironically the opposite of what NixOS is famous for) does hurt me whenever I want to do more advanced things like writing my own package or setting up a complicated dev environment. In these moments, using NixOS becomes relatively slow as I am still inexperienced with Nix (even after 6 months with NixOS as my main OS!) and have to constantly look at documentation, other people's code, or support from the community.

With that said - the added friction of having separate dev environments is a welcome change from my previous workflow, where my global system was polluted by various project dependencies.

In my previous post Converting to NixOS, I wrote:

I still haven't grokked the Nix language, but even so it's gone okay. I'm not at a level where I can write fluently, but the language is intuitive enough that I can "build legos" with all the snippets I find online.

I find that this still holds true today. I am far from an expert in the Nix ecosystem and still barely know the language, but even so I manage to be a productive user in a NixOS system.

Was it worth it?

Yes. It's a paradigm shift that I've enjoyed taking part in. I don't particularly love the Nix language or the general structure of how derivations are defined, but it's an investment. If I learn these things I get a powerful system that I can take with me for life - regardless of which machine I'm using.

And if the past 6 months are any indication, I don't even have to become an expert in order to yield the benefits!

A big thanks

Most of my configuration relies on other people's work of porting packages to nixpkgs; and of course all of the development that goes into the language, package manager, and the OS! Without all their efforts, I couldn't have set up my system as easily as I have. So a big thanks to the whole Nix(OS) community for that! I hope that I can contribute in the future.