I hopped from arch (2010-2019) to Nixos (2019-2023). I had my issues with it but being a functional programmer, I really liked the declarative style of configuring your OS. That was until last week. I decided to try out void Linux (musl). I’m happy with it so far.
Why did I switch?
-
Nix is extremely slow and data intensive (compared to xbps). I mean sometimes 100-1000x or more. I know it is not a fair comparison because nix is doing much more. Even for small tweaks or dependency / toolchain update it’ll download/rebuild all packages. This would mean 3-10GB (or more) download on Nixos for something that is a few KB or MB on xbps.
-
Everything is noticeably slower. My system used way more CPU and Ram even during idle. CPU was at 1-3% during idle and my battery life was 2 to 3.5h. Xfce idle ram usage was 1.5 GB on Nixos. On Void it’s around 0.5GB. I easily get 5-7h of battery life for my normal usage. It is 10h-12h if I am reading an ebook.
Nix disables a lot of compiler optimisations apparently for reproducibility. Maybe this is the reason?
-
Just a lot of random bugs. Firefox would sometimes leak memory and hang. I have only 8 GB of ram. WiFi reconnecting all the time randomly. No such issues so far with void.
-
Of course the abstractions and the language have a learning curve. It’s harder for a beginner to package or do something which is not already exposed as an option. (This wasn’t a big issue for me most of the time.)
For now, I’ll enjoy the speed and simplicity of void. It has less packages compared to nix but I have flatpak if needed. So far, I had to install only Android studio with it.
My verdict is to use Nixos for servers and shared dev environments. For desktop it’s probably not suitable for most.
I like the idea of NixOS in theory, but in practice I just don’t like the extra level of abstraction when configuring things. I like to know exactly what is happening. I also like to be able to open a man page for a program and just follow what’s written in there, which often times I can’t do on NixOS because they have their own way of doing things.
In general it just gives me a hacky and “bolted on” vibe.
What I’m more interested in is the package manager, which is use on a non NixOS distro (just “nix shell” alone is so awesome). I use flatpaks and they work well, but I vastly prefer Nix approach, it’s so well thought out and I would love if Nix (or something similar) would establish itself as the universal and distro independent package manager. But even here it’s lacking, after years and years you still can’t use OpenGL or Vulkan in graphical applications without a third party workaround which is crazy to me, how is that not a number one priority to fix?
Nix has a great potential as a replacement for flatpak actually as it is source based. You can guarantee what you are installing is based on which source code by compiling yourself.
Flatpak and the others are packaged by upstream. A developer can put malware in a package and upload it to flathub. That’s why it needs permission management, sandboxing etc to minimize the risk.
I like the sandboxing of flatpak not just because of malware but also for proprietary software. But I guess the same could be achieved with Nix + Bubblewrap.
Also the flatpak runtimes are insane to me, atleast the big platforms like “org.gnome.platform”. That thing weighs a nice 800mb and is pretty much a full linux install. And while in theory these should be share between programs, you can end up unlucky and have five massive runtimes for 5 different programs (like when i was trying some flatpak programs the other day). That’s a nice 4GB of overhead and programs STILL include their own libraries if they are missing in the runtimes…might as well go the windows approach.
Haha yeah. Flatpak is pretty much like having 2 linux systems on your machine at once. And of course it can be worse sometimes.