Which problem does Nix solve?

As others said, Nix can solve different problem, depending on your needs.

My usage of Nix is pretty modest: I am using NixOS as my operating system of choice on my personal laptop. For me, NixOS was a meaningful upgrade over Arch Linux. The main benefit for me is that the system just works:

  • I can’t accidentaly break it by sudo make install of a random package, because / is read only
  • More generally, before NixOS I had a “reinstall OS to clean things up” routine which I run couple of times a year. NixOS just doesn’t get into a bad state, and I am basically running the same instance of NixOS on my third laptop in a row.
  • Even if I had to install NixOS on a new laptop, I just drop my config and get essentially a clone (though, dotfiles in ~ and plasma configuration sadly still require some manual tinkering)
  • There’s build-in rollback mechanism. Even if I do a bad upgrade, I can just boot an older version of the system, without doing anything specific for rollback. Rather, I need to run explicit gc to clean up older configuration.

Despite being super stable, NixOS is also pretty flexible, and you can easily mix stable base with unstable pieces:

  • You can either run bi-yearly released stable channel or a rolling-release unstable channel
  • You can run stable channel and pick specific packages from unstable channel, without fearing that you’ll end up in a DLL hell
  • If unstable channel is not enough, it’s relatively easy to fully override specific packages to, eg, versions build from an unreleased master branch. Again, without fear of contaminating you system with different versions of libraries or breaking it in other interesting ways
  • Finally, it’s pretty easy to send patches to nixpkgs to upgrade existing software or add new
14 Likes