Hi all. I’ve been using the Nix package manager and some of its associated tools (particularly home-manager, Flakes, and devenv.sh) for a while now, but I haven’t fully committed to daily-driving NixOS yet. I have some reservations about making the switch, mainly because I feel like I still don’t have a solid grasp of the language, tooling, and ecosystem, despite having used these for more than 2 years. Recently, I’ve been considering installing and using NixOS daily, as the declarative and reproducible nature of the distro greatly appeals to me, but before I take the plunge, I have some fundamental questions I’d like the community’s input on:
From my understanding, NixOS is a rolling-release distro. I’ve been using rolling-release distros (Arch a while back and Void as of late) for the past couple of years. While I appreciate not having to reinstall my OS every few years (something I had to do in my Lubuntu and Mint days), the rolling nature of updates means my configuration files can become outdated and contain deprecated settings. Void addresses this by allowing you to install newer default configuration files alongside your current ones, which you can then manually compare. This seems like a reasonable compromise. Since NixOS is also rolling-release, I’m curious:
- How does NixOS handle out-of-date configuration files/settings during updates?
- Is there a process to ensure configuration files/settings are kept up to date during updates?
I have experience with home-manager, which I understand is based on NixOS configuration. One thing I dislike about home-manager is the inconvenience of changing a program’s configuration. If you have many programs installed and configured with home-manager, changing one program’s configuration means rebuilding the configuration for all programs, which becomes slow with more programs installed. This is not conducive to quick feedback loops and makes it difficult to experiment with settings, especially for learning through discovery. Similarly, updating a few programs also means rebuilding the whole home-manager derivation, which I find slow. So, my questions are:
- Does configuring one program in NixOS also mean rebuilding the whole system, like in home-manager?
- Is there a way in NixOS to make quick, temporary configuration changes without rebuilding the entire environment (or at least, without it taking a long time)?
One thing holding me back from fully embracing Nix and installing NixOS is the unintuitive nature of the expression language and tooling. There are many language constructs in Nix and many tools and libraries (e.g., flake-parts, flake-utils) in the ecosystem, and the documentation for these are vast and hard to navigate due to their verbosity and poor organisation. The lack of examples doesn’t help either. I especially dislike how unhelpful the errors are when building derivations, especially after being spoiled by Rust’s precise error messages. Nix errors usually just tell me that some derivation has failed to build, without clearly explaining why or how to fix it. Running its suggested command to get a stack trace results in an incomprehensible trace 100s of levels deep, making it hard to pinpoint the issue. So, I’d like to know:
- How can I get better at debugging Nix issues? What processes-to-follow, tools, tips, and tricks are available for debugging? I want to learn how to interpret and act on Nix errors, but I’m not sure how to go about this.
- Is there a particular way to tackle the documentation, as much of it seems irrelevant if I just want to do everyday developer/Linux user tasks?
- How do I determine which parts of the documentation are most relevant to whatever I want to accomplish with the system?
- Is there something like “blessed.rs” for Nix/NixOS, which lists community-preferred tools and methods, acting as a quick overview of the ecosystem?
I am planning on installing NixOS onto my Framework 16 laptop. Does anyone have experience using NixOS on this hardware? How well does it work and have you experienced any issues with your set up?
Other than that, what other potential issues/gripes that NixOS users frequently encounter with the distro should I be aware of? Do you have any other suggestions, articles, documentation, tools, or insights for someone apprehensive about NixOS before fully committing to it?