Asaduzzaman Pavel

Why I Switched to NixOS

After years of distro-hopping and dealing with the inevitable entropy that seems to plague every Linux installation, I finally found my home in NixOS. What started as curiosity about a “weird functional Linux distribution” has transformed into genuine enthusiasm for what might be the future of operating systems.

The Breaking Point

Like many Linux users, I had grown tired of the inevitable entropy that comes with traditional package management. I didn’t need a dramatic system failure to convince me—I simply wanted a declarative Linux distribution. The idea of describing my entire system configuration in code, rather than accumulating changes through countless imperative commands, was appealing enough on its own. Plus, knowing I could roll back instantly if I messed up a configuration change gave me the confidence to experiment freely.

The traditional Linux model of imperative package management—where you run commands that mutate your system state—had failed me one too many times. I needed reproducibility, reliability, and the confidence that my system would work the same way today as it did yesterday.

Discovering the Nix Way

NixOS approaches system configuration from a radically different angle. Instead of imperatively installing packages and modifying configuration files scattered across your filesystem, you declare your entire system configuration in a single file (or set of files), just like dotfiles or Infrastructure as Code (IaC) tools like Ansible. The Nix package manager then builds your system from this declarative specification. With the introduction of Flakes, this process has become more manageable, allowing me to pin exact versions of dependencies and manage my configurations, just like dotfiles or IaC with Ansible, more deterministically across different machines.

This means your system is reproducible. You can take your configuration.nix file or your Flake configuration, just like dotfiles or an Ansible playbook to any machine and rebuild an identical system. No more “works on my machine” problems. No more forgotten configuration tweaks that break when you need to set up a new development environment.

The Immediate Benefits

Atomic Upgrades and Rollbacks

Every system configuration in NixOS creates a new generation. If an update breaks something, you can roll back to any previous generation instantly. This isn’t just theoretical—I’ve used this feature countless times when experimenting with new configurations or testing bleeding-edge software.

Isolation and Reproducibility

Development environments in NixOS are truly isolated. I can have multiple versions of Node.js, Python, or any other runtime available simultaneously without conflicts. Each project can specify its exact dependencies, and Nix ensures they don’t interfere with each other or with the base system.

Configuration as Code

My entire system configuration lives in version control. I can see exactly what changed between any two points in time, collaborate on configurations with teammates, and maintain separate branches for different use cases (work laptop vs. home desktop vs. server configurations).

The Learning Curve

I won’t lie—NixOS has a steep learning curve.

The documentation is genuinely terrible. I never even knew the official NixOS wiki (wiki.nixos.org) existed, and it turns out it’s just a fork of the unofficial, backdated wiki (nixos.wiki), which is frequently the first result on Google and adds confusion with its mix of accurate and misleading information. You’ll find yourself piecing together information from unofficial Discord channels (shoutout to the server owner NobbZ for their help), YouTube videos by creators like VimJoyner and EmergentMind for their guidance, the NixOS manual, Nixpkgs manual, GitHub issues, and random blog posts just to accomplish basic tasks.

The official documentation often shows you what to do but rarely explains why or provides context for beginners. Want to understand how overlays work? Good luck finding a comprehensive explanation that doesn’t assume you’re already familiar with advanced concepts. Need to configure a service? The options are documented, but figuring out how they interact or what a minimal working configuration looks like often requires diving into the source code. Even Flakes and Home Manager, while powerful for managing configurations just like dotfiles or IaC with Ansible, add their own complexity, with sparse official guides that can leave newcomers struggling.

But here’s the thing: once you understand the core concepts and how to structure projects, it all makes sense. The initial investment in learning pays dividends in system reliability and maintainability. I spent more time in my first month with NixOS reading documentation than I had in years of using other distributions, but I’ve spent far less time dealing with broken systems since then.

Practical Advantages in Daily Use

Development Workflows

Using nix-shell, I can drop into any development environment instantly. Need to quickly test something with Node.js 14 and a specific set of npm packages? One command gives you an isolated environment with exactly those dependencies. Working on a legacy project that requires an older version of PostgreSQL? No problem—it won’t interfere with the newer version you use for other projects. Flakes make this even easier by letting me define reproducible development environments with pinned dependencies in a single flake.nix file.

Server Management

For servers, NixOS is a game-changer. Your entire server configuration is versioned and reproducible. Deploying the same configuration to multiple servers is trivial. Rolling back a problematic deployment is instant. The days of manually configuring servers and hoping you remember all the steps are over.

Package Management Excellence

The Nix package repository is massive and remarkably up-to-date. Binary caches mean you rarely need to compile from source, but when you do need a custom build, Nix makes it straightforward to override package definitions or create your own.

What I Miss (And Don’t Miss)

Great! Based on your earlier note and the tone you’re using, here’s a polished version of that paragraph you can drop into your article:


I occasionally miss the simplicity of apt install or pacman -S for quick one-off installations. In NixOS, even temporary software installs require a bit more thought—whether you want something available in your shell, user profile, or system configuration.

That said, I can still run something temporarily with nix-shell -p or nix run nixpkgs#, without installing it permanently. It’s not as quick to type, but it leaves no trace.

What I don’t miss is the anxiety around system updates on traditional distributions. I don’t miss hunting down scattered config files under /etc. I don’t miss the slow accumulation of entropy that gradually breaks things. And I definitely don’t miss the “hope and pray” approach to system maintenance.

The Community and Ecosystem

The NixOS community is small but incredibly knowledgeable and helpful. The quality of discourse is high, and there’s a strong culture of documenting solutions and sharing configurations. The ecosystem around Nix is growing rapidly, with tools like Home Manager for user-level configuration management.

Looking Forward

NixOS has fundamentally changed how I think about computing environments. The confidence that comes from having a completely reproducible, version-controlled system configuration is liberating. I can experiment fearlessly, knowing I can always roll back. I can maintain complex development environments without the fear of conflicts or bitrot.

Is NixOS for everyone? Probably not. If you just want a simple desktop that works out of the box and you’re happy with the defaults, Linux Mint, Ubuntu or Pop!_OS might serve you better. But if you’re a developer, system administrator, or anyone who values reproducibility and reliability over simplicity, NixOS might just change your life.

Resources

If you’re curious or just getting started, here are some links I found useful: