Hacker News new | ask | show | jobs
by chaorace 1985 days ago
I played with NixOS and am willing to admit that it was too difficult. It's probably great for devops, but it's just slightly too rigid for my own personal use.

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.

5 comments

> 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 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.

Still waiting on LDM...
Don't bother with NixOS then. Just use the nix package manager on Arch. You get declarative package management with nix shells, and you can take that configuration with you to any linux distro, or even macos.

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.

That's my other issue. Nixpkgs just isn't as rich as AUR. I'm willing to use mostly nix OR mostly pacman, but not some 50/50 split of both, which is what the current situation tempts. I'd be extremely pleased if there were some sort of adapter plugin that let nix manage external packages so that I'm not forced to choose.
> it's just slightly too rigid for my own personal use.

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.

It was simply too difficult for me to do that. I learned the language, built derivations, then realized it was just way too much work for what I wanted. I like what Nix brings to the table, but, ultimately, I was perfectly happy to compromise the bullet-proof integrity of nix for the simplicity of pacman + aconfmgr. It's the perfect blend for use on my own daily drivers.

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.

I agree with what you're saying. It probably took me about 2 weeks to build my first NixOS desktop about a year ago. Now I manage everything in a single repo, including all my dotfiles, all via nix. It works great. But there was a very steep learning curve.

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!

> NixOS doesn't have any simple way to configure that.

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
    '';
> xmonad on top of Plasma

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.)

I was using XMonad+KDE on NixOS just fine for about a year at my old job.
Plasma (on X) generally works very good with other WM. Here's how to use i3: https://github.com/avivace/dotfiles