Not Nix

you lost me at Home Manager

NixOS is a very interesting specimen: a truly genius idea that achieves every goal set out on paper, just to end up becoming a project best left as an idea. Don't get me wrong, NixOS is a phenomenal server distribution; I truly have nothing negative to say about it in that regard. This is about Desktop NixOS. Or, if you dare, nix on a different distro.

rapid mutability is a requirement

True story: I was working on an embedded project with a friend. Classic RP2040-based PCB and a baremetal firmware written using the (wonderful) Pico C/C++ SDK. This of course requires the arm-none-eabi toolchain to target the MCU, which is really a small ask on a sane Linux distribution.

Let me illustrate:

  • Debian: apt install gcc-arm-none-eabi
  • RHEL: dnf install arm-none-eabi-gcc
  • SUSE: zypper install cross-arm-none-gcc
  • Gentoo: crossdev -t arm-none-eabi
  • OpenBSD: pkg_add arm-none-eabi-gcc

Wow! So easy! How do you do it on Nix?

Well, to install it as you would expect, simply edit your configuration.nix:

environment.systemPackages = with pkgs; [
  gcc-arm-embedded
];

Then rebuild with sudo nixos-rebuild switch and wait 5-10 minutes on your well-specced machine to recompute the derivation.

Don't want to wait that long? With nix shell nixpkgs#gcc-arm-embedded you can install it temporarily!!! No its not available outside of that shell. No, you have to run make on your project from that shell or it cannot build. No, its really not more convenient in any way.

"Well, on Gentoo you have to compile the toolchain locally, which is far longer than five minutes for a derivation!!!!1!!"

True. But imagine you're installing something smaller like cowsay: 10 seconds on Gentoo is still 10 minutes on Nix. Still one command to get it permanently on a sane distribution. Regardless, its enough of a pain on NixOS that my friend elected to just... not install the toolchain. Turns out installing stuff needs to be low friction for desktop-use, as users cannot predict all the tooling they will need before needing it.

hardly hardware

Did you know Debian still supports PowerPC with the latest release? OpenBSD on SPARC64? Gentoo on MIPS? Nobody uses SUSE.

What's the point of an ultra-portable distribution that can't port itself beyond x86_64 and aarch64? All the work you spend carefully hand-crafting your config, and you can't even move it outside the clutches of Intel/AMD/Arm.

RISC-V is a solid maybe for NixOS in the future, but progress is slow and stability is low.

atomicity matters, but not for you

Being able to rollback is kind of a non-feature. Why does someone have to switch to a previous derivation?

  • Bad config -> This isn't catastrophic outside of Nix.
  • New package broken -> The distro rolls too fast. Rollback is a Band-aid fix.
  • New derivation won't boot -> Skill issue.

I see it as a party trick. There is no end difference between just adding a GParted ISO to GRUB (and a chroot script), and the Nix way. Every distro has an extremely quick flow for fixing the kinds of issues that rollback fixes, without the need to memorize the nonportable runes of Nix's langague.

you lost me at Home Manager

Despite what Nix parroters may try to convince you of, Home-manager offers no advantage over a classic dotfiles approach. And it's honestly worse in most ways too.

You not only need to understand program config, you also need to look up the special home-manager way of configuring it. You not only need to write the annoyingly verbose recipes, you also need to write them for every config file in your homedir, lest your config be lost. You not only still need copying of files (binaries or things too annoying to write in Nix), you also need to explicitly state what must be copied via configuration in Nix.

Purpose built utilities achieve better flexibility than Home Manager for your dotfiles.

writing your own gets you 100% there for 10% effort

So in general we get two advantages to NixOS:

  • Install the same set of packages on all systems
  • Centralise configuration of the systems

These are so incredibly easy to achieve with the simplest of scripts. Copy files from /etc/, create a data schema that encodes your packages and their configs, combine with a dotfiles manager, and you have a script that allows setting up an identical machine in record time.

Every other feature Nix offers simply does not benefit desktop users.

etc

I could keep going but its as worth it as installing NixOS on a desktop is truly a waste of time. Here are some bonuses:

concretely explain what a flake is without looking it up

Try.

how many times do you have to reinstall before the numbers check out?

Ridiculous learning curve = hundreds of reinstalls until time profit.

how do you install something from a third party?

make install doesn't work!!!!!

systemd

lol

yes guix has these issues too

i sincerely tried guix after trying nix, and it solves many problems (if you look past poor infra). still awful for desktops (servers good!).

don't even mention arch

Please. Its actually just a bad distribution. I don't care that NixOS is a better person than Hitler.