I think the least that distros can do, is allow listing all packages and system settings in config files like .toml
rather than having to type in every single package to install, or click through system setting GUIs to setup. Would that require using a whole programming language or system like NIx?
While NixOS works much differently from most distros, that’s the only reason I use it: package and system settings in text files. If I fix something, it’s fixed permanently, I don’t need to hunt down files in random directories if I want to change a setting. If I ever need to reinstall the OS I don’t have to write dnf install every single damn package
and manually setup all that up all over again. Having daily-drove Windows macOS & Fedora as throughout the years, my setups have felt hacky as well as houses of cards as I’ve wanted or had to set them up again (I don’t mean Fedora specifically, but distros in general).
Basically it feels insane that it’s the way most linux users and servers in the world operate. If I, a humble computer hobbyist can figure out Nix, why don’t more users do so, and why is Nix so niche?
In contrast to most people here who talk about solutions to this problem with tooling often used for batch deployment what I’ll say is just my opinion on the matter. Outside of OEM or fleet deployments the advantages of nix just aren’t that apparent. You feel like your system was a house of cards but I’ve personally never felt that way and I suspect neither have most other users. Every OS to ever exist more or less behaves in a similar way, i.e. it’s mutable, so most users have only ever known this behavior. Installing software and then having to configure it in a software specific way is the norm across all existing computer platforms for all of time and for most situations it’s worked well enough. It isn’t nearly broken or painful enough for most people to care. Honestly if nix was the norm for Linux it might even scare away windows or Mac users looking to move. Linux is already a learning curve and completely changing the software installation and management paradigm(beyond using a package manager which can conveniently be explained like an app store) would not help the situation.
I don’t provision any two devices exactly the same way, and if I did there’s nothing stopping that provisioning script/tool from changing or becoming out of date over time since I’d only run it once every couple of years. I briefly looked at nixos but as another reply said, the major hurdle was the documentation and trying to get “the right way” to do things. I remember flakes being mentioned but being experimental and there being two other things competing as the solution to the same problem and at that point I lost interest. I moved to fedora for the first time in a decade recently and installed what I needed via dnf. It wasn’t a difficult enough process to justify learning another programming language.