In terms of all the linux systems I have used, NixOS seemed to least magical to me in terms of what is happening under the hood.
In terms of all the linux systems I have used, NixOS seemed to least magical to me in terms of what is happening under the hood.
Simple package based distros like Arch basically just extract archives. Very few packages trigger post-install steps which usually just (re)generate something like initrd.
Afaik, bricking Ubuntu is either due to user error (e.g. mixing incompatible package sources) or the devs released broken/buggy packages...
This combined with the fact that the full source code for the system is contained within a single monorepo that I can checkout and grep through makes NixOS the easiest to understand and most transparent distro I have ever used.
Well, the updates themselves yeah, but not what data they use. You cannot always rollback database upgrades for example, without also having to rollback the data source of the database. In most cases you're right though.
I'm saying this as someone who is a fan of NixOS and use it on all my servers because I tend to forget what I do if I just ssh in and fix stuff. Although I'm on Arch/CachyOS on all other hardware.
Sure it's simple, just like 80% solving the problem is usually significantly simpler than solving it 100%. Nix (and its generation) is the only package manager that actually works.
Try installing kde and gnome, then uninstalling both and check how many packages remain.
Nix can do that with the whole world with nothing residing.
Sounds like a package manager or package problem. Competent package managers (e.g. dnf) remove unneeded packages and all their owned files. Albeit, I think with apt you need to do a manual autoremove to remove orphaned packages.
Not suggesting that they're equivalently powerful compared to nix, but this specific thing shouldn't be a problem with traditional package managers.
Then nix layers way more nicety on top by offering modules, but nothing prevents you from ignoring all that and just using installing packages.
I'm comparing it to my experience with Ubuntu where packages can have complex install dependency flows that can destroy your system at any time. They also pollute your entire system. This is simple in the same way assembly is a simple way to program. You can do anything and destroy anything. It's essentially spaghetti code but in OS form.
You can say it's "user error" or "packaging error", which is arguably true, but this "user error" and "packaging error" literally does not exist in NixOS. Installing a package is unable to touch anything outside of it's own designed nix store folder. That is why it's so much simpler to understand for me. I can check the nix store path and see what a package has. I can fearlessly install a package without worrying my system will break. I don't have to worry about residual dependencies remaining on my system.
The nix language itself ain't it though, I agree.
- in traditional package manages, the dependency is global, and potentially breaks everything else installed.
- in nixos, package is isolated to the environment and can co-exist on its own, for the purpose of one application.
I've found three "hotspots" that break Ubuntu at a pretty high rate of incidence: 1) Upgrading to the next distro release 2) Installing or updating Nvidia drivers using the built-in management tool 3) Changing to a different kernel "series" (such as switching to a hardware enablement kernel)
In all these cases, I've found that the process stands a solid (hand-waving: 20%) chance of stopping in the middle, requiring manual resolution of broken packages.