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?
We have some of these things. You can type in
dpkg --get-selections
to get a list of all packages on a Debian distribution. You can useapt-clone
to install or transfer all installed packages to a new system, with a single command. You don’t need to install every package seperately. And Fedora will have a similar concept. I think the package manager also keeps track of some of the config files. You can usedpkg-reconfigure
to configure your locale and several other things. These are being used for fully automated rollouts. And I believe other distros have similar tools and package managers. And then we have proper configuration management like johntash said.And remember, Linux is an organically grown ecosystem for quite some time now. We have things like the FHS and it’s always the same 3 locations where config files reside. But it’s not a tight ecosystem like iOS and there is no central authority mandating every developer on earth use the same config format and syntax to describe things.
NixOS on the other hand follows a declarative approach. You’d compare that to Debian configured by Ansible (for example). Not Debian alone. And I mean go ahead and install some software which isn’t packaged yet, and you’ll find out why NixOS isn’t more popular. It’s a nice and clever thing, though. Both the declarative aspect and being immutable. But it comes at a price. And then we have some issues with the implementation and I think the error messages are always very unclear. That’s the two main issues I struggle with. It always requires very advanced programming concepts to do very simple things, and I often need to have a look at the source code to find out what to do. And if the config doesn’t apply, it often provides a very unhelpful trace, sometimes it doesn’t even say which of my config file broke. Earlier this week, I spent almost 2 hours to do something that would have been an “npm install && npm run dev” on a different distro. And that’s why it isn’t very popular. It is very nice, though.