Linux used to be a bold choice a few years back, but now it's a practical option considering the ‘weird’ course of mainstream operating systems. I experimented with multiple Linux distributions, some of which earned a permanent position in my home devices. However, NixOS is something that is wildly different from the Linux distro I'm used to.
It didn't try to fit into a mold, wasn't afraid of pushing bold ideas, and is certainly not the thing a regular user should install. After spending more than three months using NixOS, I've developed a soft spot for it. I'm not hiding the fact that it's difficult to run and use, but the benefits outweigh my initial efforts.
First impressions were not good
A distro that's the opposite of simplicity
A regular user, or a Windows or macOS deserter, looks for the simplest onboarding and user experience. NixOS looks very easy to install because it comes in both terminal and GUI-friendly options. The only confusing setting while you install NixOS is “Allow unfree software,” and I selected it just to get to the next screen. But that's the easy part.
After that, it's a plain desktop that offers some basic apps and nothing more. I tried the KDE Plasma version first, and it has system apps and tools, but lacks a GUI app for downloading apps. The only way was to use the terminal or modify the configuration file, which sounded like a new thing. There were numerous hard-to-grasp concepts, like the declarative approach, generations, atomic updates, rebuilding OS, and more.
I was on the brink of calling it a day and never returning to NixOS. But I'm glad I stayed and looked into the concepts that showed the modern approach to building and managing an operating system.
Declarative approach is a game-changer
One configuration file
NixOS offered a declarative approach where I could control everything on the system by just editing one file. The idea seemed too complicated at first until I realized how inefficient the current designs were. On a traditional Linux distribution, you need to modify different files to control their respective settings and features. You cannot just open the networking file and define user or disk mounting permissions there. Every system element has a designated file.
It's worked great for the most part, but it becomes ‘trivial’ when you realize what a single configuration file means. In NixOS, I can define and change every OS element, including installed packages (both global and user-specific), in one file. I don't need to hunt for individual files to define SSH settings, set up users, control networks, or enable a desktop environment.
Everything is transparent and right there at my disposal. Editing the file in the text editor or the terminal is my only way of making systemic changes. It makes it very easy to track things and check everything that's there on your Linux system. Every time you make changes to the file, NixOS forces you to rebuild the system. If you don't do that, the changes don't take effect.
Rebuilding NixOS creates a new generation, and it makes experimentation very convenient. NixOS adopts a preventive stance and keeps the previous system state (before you made new changes to the configuration file) separate. If you encounter any issues while applying changes, you can easily go back to the old state. It also makes undoing changes very easy, as you can pick a generation from the boot menu.
NixOS containers are pretty exciting, and here's why I like them more than Docker
NixOS' containerization utility is far from perfect, but it's yet another aspect I love about the distro
Atomic updates, multiple packages support, and testing apps
Hard to find elsewhere
Atomic updates aren't a niche concept, and a lot of distros now offer them. Simply put, your system applies the update only if everything goes fine. If anything fails during the update installation, it simply rejects the update. So, you don't end up with a broken system and then have to rush to reinstall the OS.
The next best thing that I personally like is the ability to maintain multiple versions of the same package. So, I can have the latest and a slightly older version of Firefox or any other software installed side-by-side without any conflicts. This is one of the most under-appreciated elements of NixOS. You don't need to do any kind of virtualization or pick only one version out of the two.
NixOS also lets me “test” packages without installing them permanently. I can use Nix shell to test-run a software or a specific version of the software. The moment I exit the terminal, NixOS purges the software from the system path, and I can perform garbage collection layer on to remove all the related files.
While other distros focus mostly on cosmetics or performance, NixOS treats the most useful elements with care. The idea of an unbreakable system where you can keep track of every small change makes me feel powerful. I also like the reproducibility aspect because the single configuration file is like a seed.
I can plant it on any NixOS install, and the system will adopt the settings and packages mentioned in the configuration file. It beats the effort of configuring everything manually on a fresh OS installation, especially if you run multiple devices and prefer a single configuration on all devices.
Can't go back
NixOS might force me to search and learn everything, but the design is so rewarding that I cannot go back. It's so simple to manage and track that other distros look pale in comparison. NixOS tries to fix the overlooked problems of Linux systems and does a great job of building an unbreakable system.
It's hard to imagine a Linux system that doesn't have failsafe mechanisms built in or cannot isolate packages. I can make any NixOS install a replica of my system with a single configuration file. If you haven't tried NixOS yet, you're missing out on something unique.
NixOS
A Linux distro that can survive tweaks and experiments and supports atomic upgrades.
