Okay, so hear me out…
My interest was piqued when I started knowing more and more about NixOS from the recent “I use NixOS btw” wave everywhere. The main selling point for me was the one config file to rule them all. I have always wanted something like that on Arch. And here it is with a dose of immutability, and extra stability in the form atomic updates and whatnot. You also had the option of turning it to a rolling release model; that’s awesome! What’s not to love then?
So, I kept reading even further about NixOS. I got to learn about how the Linux root structure is almost completely different. Building packages from the source follows a completely different procedure. Configuring anything in your system will rely on the main config file, instead of executing the standard terminal command, or editing their respective config file. The list goes on…
I understand that all of this is done by design. They are not flaws, per se. Rather the means to facilitate the philosophy that every NixOS user is after. However, that also does not mean it is inherently flawless in the grand scheme of the entire ecosystem. I personally love Linux, and would always want to grow with my knowledge in how I handle and get things done in it. Wouldn’t me disconnecting away from that, in favour of the NixOS’ arcane methods, just hurt my progression in my Linux learning journey?
This is a genuine question, of course. I have been thinking about this for a few days now, unsure of whether I should change course and get into it or not. I also do not have the time to use other distros aside from what I mainly install; I would be all in. So, what do you all think?
Linux is Linux, nix is just a tool to essentially build a view of the root filesystem in a special way. In the end, it’s not that different than if you do everything from Ansible playbooks, in a Dockerfile, from Puppet/Chef or any other automation technologies.
Heck, if you look closely at Debian/Ubuntu, there’s the whole debconf system that lets you configure packages directly from the package manager, and it generates configuration files based of that. If you install Postfix on Debian, it’s going to ask you how you want to use it and it generates some ready to use configuration files. Then if you install Dovecot, it might just work out of the box using that configuration to know how you set up Postfix and let you fetch your emails over IMAP. It’s not nearly as comprehensive as nix does it, but the concept of a main configuration file is far from new, nix just pushed it to a whole other level.
Building packages also differ wildly between distros. ArchLinux uses simple PKGBUILD files that are essentially just bash scripts. Debian uses debhelper and dh_make, and lets you do some really crazy things with the build system to reduce boilerplate so that all Python packages for example are built exactly the same way and often in just a few lines.
Distros also put files in different places. On Debian, system-wide systemd units are in
/lib/systemd
, but it’s/usr/lib/systemd
on Arch. Distros use different tools:apt
,yum
,dnf
,pacman
,pkg
, etc. Debian in particular really likes to ship with heavily customized configurations. For example, if you install NGINX on Debian or Ubuntu, you have a/etc/nginx/sites-{available,enabled}
and it’s got a helper script to easily enable/disable a site. On Arch, there’s no folders, you get a plain basic default/etc/nginx/nginx.conf
. On macOS, I have that config in/usr/local/etc/nginx/nginx.conf
. The default location of configuration files is inherently a compile-time property, just so happens that most distros puts it in the same place.I’ve worked with part-time admins / web developers that completely panic when they SSH into a system that’s not Ubuntu and they don’t know how to do anything.
If you like NixOS, just enjoy and you’ll be fine. Completely different means of achieving the same things, and if anything will make you more aware of potential variations. Nothing preventing you from having VMs with more classical distros to keep up to date with how to admin those. A lot of things still work the same: you can still
systemctl restart
a service, you’ve still got a bash shell that works exactly the same. You’re just going to manipulate and template nix files instead of directly modifying configuration files, but still ends up generating that file for the software to use.I use Arch for all my stuff, and Ubuntu at work. Because I use one doesn’t make me not well versed in the others. NixOS have real advantages, and I know some companies that have fleets of NixOS servers.
These are actually very solid points. Not much I can contend with here. I suppose one has to weigh down his requirements and wishes, versus the drawbacks of that new endeavour.
Thank you for the insight!