DEV Community

Sleeyax
Sleeyax

Posted on

Why I stopped using NixOS and went back to Arch Linux

This post is a bit of a rant. Read at your own discretion.

About a year ago I switched from Manjaro linux to NixOS as a daily driver on my laptop. I run Arch linux on my desktop PC.

My setup in a nutshell:

  • NixOS installed on 2024-05-17 (stat / | grep "Birth")
  • Using nixos-unstable branch + flakes + home-manager + cachix
  • My nixos-config (public GitHub repo)

I fell in love with the idea of NixOS: as input you (basically) define your whole system configuration in a special config file syntax (Nix) and as output it gives you a reproducable build of your whole operating system and keeps track of changes so you can always revert back to an older generation if necessary. While this is nice on paper, it didn't end up working out for me.

After using NixOS for almost 1 year I decided to switch back to Arch linux on my lapop. Here's why:

NixOS breaks. All. the. time.

Ironically I broke Arch only once in 5 years whereas NixOS already breaks before updating. Something always requires a change in my Nix config before the nixos-rebuild command finally succeeds. It's a good thing this check is in place, but the constant rebuild > fix > rebuild > fix > rebuild > ... pattern becomes quite annoying after a while.

When the new configuration finally builds, more ofen than not some component randomly stops working after reboot. If it isn't broken copy paste between electron apps it is audio or bluetooth that randomly stopped working. I'm left alone to fix it with 0 clue as to why it broke.

Error messages are cryptic

This is related to my point above but it deserves its own section.

Look at this error:

$ sudo nixos-rebuild test --flake .#laptop
warning: Git tree '/home/sleeyax/Programming/nix/nixos-config' is dirty
building the system configuration...
warning: Git tree '/home/sleeyax/Programming/nix/nixos-config' is dirty
error:
       … while calling the 'head' builtin
         at /nix/store/xq5rfjj1z2r8yx338arajg5vwsxh1fri-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         elsewhile evaluating the attribute 'value'
         at /nix/store/xq5rfjj1z2r8yx338arajg5vwsxh1fri-source/lib/modules.nix:927:9:
          926|     in warnDeprecation opt //
          927|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          928|         inherit (res.defsFinal') highestPrio;while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/xq5rfjj1z2r8yx338arajg5vwsxh1fri-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `warnings':

       … while evaluating definitions from `/nix/store/xq5rfjj1z2r8yx338arajg5vwsxh1fri-source/nixos/modules/system/boot/systemd.nix':

       … while evaluating the option `systemd.services.home-manager-sleeyax.serviceConfig':

       … while evaluating definitions from `/nix/store/7dv77a007yd3z9w5gkvvn919nnrg2hf2-source/nixos':

       … while evaluating the option `home-manager.users.sleeyax.home.file."/home/sleeyax/.config/fontconfig/conf.d/10-hm-fonts.conf".source':

       … while evaluating definitions from `/nix/store/7dv77a007yd3z9w5gkvvn919nnrg2hf2-source/modules/files.nix':

       … while evaluating the option `home-manager.users.sleeyax.home.file."/home/sleeyax/.config/fontconfig/conf.d/10-hm-fonts.conf".text':

       … while evaluating definitions from `/nix/store/7dv77a007yd3z9w5gkvvn919nnrg2hf2-source/modules/misc/xdg.nix':

       … while evaluating the option `home-manager.users.sleeyax.xdg.configFile."fontconfig/conf.d/10-hm-fonts.conf".text':

       … while evaluating definitions from `/nix/store/7dv77a007yd3z9w5gkvvn919nnrg2hf2-source/modules/misc/fontconfig.nix':

       … while evaluating the option `home-manager.users.sleeyax.home.packages':

       … while evaluating definitions from `/nix/store/9cmg9v44pmw1fdz0bzn357djc8g2fn1g-source/modules/home':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: logseq has been removed, due to lack of maintenance and blocking the Electron 27 removal.

Enter fullscreen mode Exit fullscreen mode

Do you spot the issue? Right! After spitting out a bunch of unreadable nonsense it says at the very bottom that the logseq package has been removed.

First of all, why bother with the verbosity if it's just a bunch of unreadable nonsense no one except package maintainers or core Nix devs can make sense of? Second - a bit off topic but... - removing a package I use daily without even suggesting an alternative or workaround. Seriously?

Huge update sizes

NixOS handles dependencies very differently compared to Arch Linux, leading to much larger update sizes. Instead of replacing packages in place, NixOS installs new versions alongside old ones, keeping multiple system generations.

For example, updating glibc in Arch Linux simply replaces the old version. In NixOS, every package depending on glibc is rebuilt or redownloaded, massively increasing disk usage. While this ensures rollback safety, it also means your system can quickly bloat up (unless you run nix-collect-garbage periodically).

# An example for the 'glibc-locales' package:
$ ls /nix/store | grep glibc-locales
0j3cpwmwab04jmvyzcqh538jzrnm60hn-glibc-locales-2.40-36.drv
0k4azawc10ygacxyqjz36cqghxsicqpr-glibc-locales-2.40-66.drv
2i4wm7zsm2nkn7sn2aj7ng4x1k3p71gz-glibc-locales-2.39-52.drv
2sk3c2n6p3aavhd7659ll2w63mv0i3aw-glibc-locales-2.40-66.drv
33alnvvkrp1s13vg5frn1zca34xbz424-glibc-locales-2.39-52.drv
51ssq420b3wqvcxmgmcw00hk8zkh6gvw-glibc-locales-2.39-52.drv
# ...
Enter fullscreen mode Exit fullscreen mode

By contrast, Arch Linux updates are simpler to reason about. Old files are removed automatically and shared libraries don’t cause redundant downloads. If you care about minimizing disk usage, or your internet/network is capped, NixOS can be a nightmare.

Compilation takes forever (and binary caches are unreliable)

NixOS builds packages in an isolated environment, which often means compiling everything from source - even for minor updates. While binary caches like cachix theoretically speed up installations, they frequently miss packages due to system differences, forcing unnecessary compilation.

For example: if a dependency isn't cached exactly as required, NixOS will still rebuild it locally even if it's a common package. This can take hours, especially on slower hardware. On my machine regular maintenance updates without (or with bad caching) easily take 4-5+ hours to complete.

Meanwhile, Arch Linux simply downloads prebuilt binaries with pacman or an AUR helper, making updates take a couple of minutes instead.

If you hate waiting for your system to rebuild itself constantly, NixOS will drive you insane. If you love to recompile everything from scratch why aren't you using gentoo instead?

Poor documentation

Ironically, I tend to find better answers on the Arch Wiki than on the NixOS Wiki itself. The NixOS documentation is often vague, outdated, or overly abstract, assuming deep familiarity with Nix's unique concepts.

Practical examples are scarce and official guides frequently leave out crucial details forcing users to dig through forum posts or even GitHub issues to figure out basic tasks.

For a system as complex as NixOS, good documentation is essential. Unfortunately, it just isn't there.

Conclusion

I wish NixOS a bright future ahead to address all of its shortcomings. But until then it's no longer my favorite distro and I wouldn't recommend daily driving it as your desktop linux distro unless you have a very specific use case.

Alternatives already exist for its 'killer features':

Feature Alternative
Generations BTRFS snapshot volumes
Declarative package management aconfmgr
Declarative configuration management Dotfiles synced in a git repo
Nix flakes for development Docker (or podman etc.)
nix-shell nix package manager on Arch (or another supported distro)

Also keep an eye on system-manager (manage system config using nix on any distro) - which is still in early development at the time of writing.

Top comments (0)