I've been curious about NixOS for quite some time. Reading about it I couldn't see how the config sharing capabilities, setup, or rollabck would be better than Arch and sharing the list of installed packages, using downgrade or chroot.
So I decided to run NixOS in a VM and I'm still confused. An advantage I can see for NixOS is its better use of cores and parallel processing for packages install.
It's clear that I'm missing something so please help me understand what it is.
Edit: Thank you to everyone in this great community! It's always so nice to have a constructive and sane discussion.
After reading so many comments, they all confirm what I've read before and I may realize that my real problem is already having a stable system and no need for the great NixOS options that are very neat but would not benefit my specific and simplistic needs.
That being said I can't refrain myself from being curious and will continue testing NixOS.
The need for only 2 config files is the top of the iceberg but hiding more complex configuration to rely on. Not that I really have too much spare time but I do enjoy learning and tweaking NixOS. With its current development state, things are changing a lot so it can keep me busy for months. That's probably what I was mostly looking for: another toy to play with.
Along my journey I will learn a lot about NixOS and may find a feature that will motivate my switch to it. Thanks again for all your precious feedback!
I'll also take this opportunity to share the best help I've found so far to start with NixOS: https://github.com/MatthiasBenaets/nixos-config And his 3 hours (!) video: https://m.youtube.com/watch?v=AGVXJ-TIv3Y
NixOS puts your full system configuration in a portable set of files. You can easily reproduce the same configuration on another machine. I also like that instead of accumulating a growing list of packages that I don't remember why I installed I have package lists specified in files with comments, and split into modules that I can enable or disable.
IMO NixOS works best when you also use Home Manager to apply the same benefits to your user app configurations and such. (OTOH you can use Home Manager to get those benefits without NixOS. But I like that I get consistency between the OS-level and user-level configurations, and that both use the same set of packages.) I use Home Manager to manage my list of installed packages, my dot files, Gnome settings, Firefox
about:config
settings, and so on.You might be installing packages imperatively with
nix profile install
or withnix env -i
. If that's the case you're not going to see the full benefits of a declarative system in my opinion. I prefer to install packages by editing my Home Manager configuration and runninghome-manager switch
.I like that NixOS + Home Manager automates stuff that I used to do by hand. A couple of the things that I do or have done are to,
Now I have that kind of stuff automated:
You can see that I compile some things from source. That's fine on my desktop, but takes a while on my travel laptop. But I don't need to compile on my laptop because I can use Nix's binary cache feature. I push my NixOS and Home Manager configurations to Github, and I have Garnix build everything that I push. Garnix stores everything it builds in a binary cache. So when I pull my latest configuration version on my laptop it downloads binaries from that cache.