I recently made the switch to NixOS after using Arch for several years. NixOS is different from any other operating system I’ve ever used. It has a built-in declarative functional programming language ‘Nix’, that can be used for configuration, and package management.
Lessons Learned Link to heading
If you subscribe to the way NixOS is intended to be used, it makes it easy to manage a Linux system. Trying to dip your toe in halfway is when problems can arise.
Compared to Arch, NixOS is a very stable platform. Rollbacks are built into the system so if a configuration change causes your system to be unbootable, it is easy to roll back to a previous working install. This makes updates painless and also means experimentation does not need to be feared. To make it even easier to experiment, NixOS has a built-in system that will spin up a virtual machine that can be used to test a new configuration.
A few pros and cons of switching to NixOS from arch:
Pros Link to heading
- Nix, the packaging language is amazing. The ability to configure an entire system from one file, or set of files is extremely beneficial.
- Once you have your configuration set up, new systems of very easy to set up. All you need to do is load your configuration and rebuild, and voila - your entire system is configured just the way you want it to be. Unlike Arch you don’t have to spend days reconfiguring everything to get it just right. Unfortunately this doesn’t yet extend to user configuration, but it soon will.
- Rollbacks are amazing. Have you ever borked your Arch configuration and had to boot into a live install to fix it (I actually kept an extra Arch install just for this purpose), not with NixOS, just choose a different option from the bootloader and boot into an old config.
- NixOS has one of the best implementations of ZFS on Linux i’ve ever used. It’s integrated right into the system, and is completely seamless. No worrying about broken setups because you had to rebuild your kernel.
- Packages don’t interfere with each other and each have their own set of dependencies that don’t conflict with other packages.
- Nix has a great community and people are very happy to help. I recommend checking out #nixos on freenode.
Cons Link to heading
- It’s a fair bit of work to get everything set up the way you want it to be the first time, especially because it will have to be done the ‘Nix way’, you have a bit of learning to do (this could be a pro if you like experimenting).
- If you’ve been used to doing something a certain way on other Linux systems, things will likely be different on Nix.
- Package availability isn’t as good as Arch. You will probably have to write your own package for anything that isn’t super common.
- Once you get used to writing packages it isn’t exactly difficult, especially for simple packages, but after being used to the AUR, and being able to just install anything you want right away, when you trying to get something done and you need a package that isn’t available, having to write a package yourself will take some getting used to.
- Everything is put in a different place then other Linux/Unix systems, so programs might not work if they are hard-coded to use certain paths.
Conclusions Link to heading
A big part of NixOS is configuration, and while it might be a bit of work to set up the first time, once it’s been done maintenance is very easy, and replicating a system on a new computer is effortless. The idea that your computer is precisely the way you defined is refreshing. The configuration is basically documentation that can be referred to when in the future you cannot remember how things are set up.
All in all NixOS is great, I’m super happy with it. After switching away from Arch I have happily been using Nix for several months and I have no plans to switch back to Arch on my main system. I still have Arch on some of my computer’s and think it’s a great system, but Nix’s configurability, stability and interesting way of doing things makes it worth a joy to use.