I was pleasantly surprised to find the contrary to be true: in my experience, NixOS is the only distro to give you _every_ DE+WM combination pre-generated as a login session that you can pick from the display manager.
I think it's fantastic that we have a declarative, deterministic, idempotent package manager that works across all these OSs. I've used it happily for years now without ever bothering to try NixOS.
I get what you're saying, but the reality is the opposite. Nix is _far_ more powerful and flexible than anything you can do in Arch. It sounds to me like you just wanted a particular packages available, and Nix didn't have that. But if you have the inclination to learn Nix, you will be able to customize your system, in a safe and repeatable, declarative approach, far more than you could ever do with Arch.
With that being said, I would use NixOS over arch + aconfmgr 10 out of 10 times in a production DevOps environment. What time/effort you give up in terms of instant usability is immediately recovered when you start working in terms of modular and widespread system deployment.
After that experience, I'd actually hesitate to use NixOS in a production environment. The main problem is Nix and the library functions themselves are incredibly obtuse. It also doesn't help that it's a dynamic functional language, so everything just looks like magic when you're first using it. I think most engineers would really struggle with it. I'd be more comfortable introducing Haskell - I think it's easier to learn and understand!
It's been a long time since I last used XMonad, but wouldn't the following configuration suffice?
services.xserver = {
enable = true;
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true;
windowManager.xmonad.enable = true;
};
Even if there isn't an official NixOS option to configure things the way you want, you can always put whatever configuration you like with the "environment.etc" option. For example, the following configuration would create a file in /etc/example/example.conf with the line "name=value". environment.etc."example/example.conf" = ''
name=value
'';I gave up on XMonad + Gnome before I switched from Ubuntu to NixOS 6-7 years ago. Does XMonad + KDE work? I would love to get such combos working in NixOS / home-manager.
(We also need to bite the bullet and get X-less Wayland working properly. I think I might be tempted to plan everything out at once so we don't get conflicting refactors or too much complexity.)
Let me give an example: let's say you want to use xmonad on top of Plasma. NixOS doesn't have any simple way to configure that. You have the mutually exclusive options for one or the other, basically.
I know Nix is powerful enough to do this, if I wanted to go offroad and create custom packages/derivations, but that's the point where I am no longer happy with the utility/work tradeoff. It's what ultimately sent me packing back over to arch.
When I came back to arch, I was left hankering for NixOS's declarative package management, if that could be somehow reconciled with the baseline arch package system. This led me to using the aconfmgr utility, which checks in packages and system configuration files into a home-based filetree.
Once you've got it set up, aconfmgr can regenerate your current configuration from scratch, declaratively! I was able to check the aconfmgr tree into my dotfiles repo, so now it tracks my home state AND my system state. Unlike Nix, this still uses file-based configuration, but it's all versioned and fully reproducible, so I no longer particularly care about that caveat.