• 1 Post
  • 80 Comments
Joined 1 year ago
cake
Cake day: April 27th, 2024

help-circle
  • Managing 30+ machines with NixOS in a single unified config, currently sitting at a total of around 17k lines of nix code.

    In other words, I have put a lot of time into this. It was a very steep learning curve, but it’s paid for itself multiple times over by now.

    For “newcomers”, my observations can be boiled down to this: if you only manage one machine, it’s not worth it. Maaaaaybe give home-manager a try and see if you like it.

    Situation is probably different with things like Silverblue (IMO throwing those kinds of distros in with Guix and NixOS is a bit misleading - very different philosophy and user experience), but I can only talk about Nix here.

    With Nix, the real benefit comes once you handle multiple machines. Identical or similar configurations get combined or parametrized. Config values set for Host A can be reused and decisions be made automatically based on it in Host B, for example:

    • all hosts know my SSH pub keys from first boot, without ever having to configure anything in any of them
    • my NAS IP is set once, all hosts requiring NAS access just reuse it implicitly
    • creating new proxmox VMs just means adding, on average, 10 lines of nix config (saying: your ID will be this, you will run that service) and a single command, because the heavy lifting and configuring has already been done, once -…





  • At this point, package management is the main differentiating factor between distro (families). Personally, I’m vehemently opposed to erasing those differences.

    The “just use flatpak!” crowd is kind of correct when we’re talking solely about Linux newcomers, but if you are at all comfortable with light troubleshooting if/when something breaks, each package manager has something unique und useful to offer. Pacman and the AUR a a good example, but personally, you can wring nixpkgs Fron my cold dead hands.

    And so you will never get people to agree on one “standard” way of packaging, because doing your own thing is kind of the spirit of open source software.

    But even more importantly, this should not matter to developers. It’s not really their job to package the software, for reasons including that it’s just not reasonable to expect them to cater to all package managers. Let distro maintainers take care of that.