by georgyo · 5y ago · 0 comments
Over flatpaks and snaps, I choose Nix. I really don't want to shove everything I do into per application containers.
Actually, every single bullet point they mentioned is solved in NixOS.
Distinct packages? Check
Immutable OS with trivial and guaranteed roll back? Check
Different applications using different libraries? Check
Pipewire? Check
Different libgl support? Check
The best part is that all of these is possible with the same exact tool. It isn't a hodgepodge of different tools to accomplish different tasks.
One thing NixOS has going for it though is currently having many more users than Silverblue has if comments on HN are any indication (and they probably are) which is probably an effect of its having been around a lot longer. Wikipedia claims that NixOS's initial release was in 2003.
Though it's always been a huge pain to get everything set up (especially things involving graphics), once it's set up it works forever for everyone in the ecosystem.
This sounds nice, but it's the opposite of the Unix philosophy, which will always rub me the wrong way. I thought of systemd this way at first, but then I saw how it was composed of a bunch of different, optional services that can be swapped out for other things fairly easily while still allowing systemd proper to manage and interact with them.
That one thing is building packages in sandboxes and adding them to the nix store. You can see that manual for Nix is actually fairly short: https://nixos.org/manual/nix/stable/
The properties of Nix allow for everything else. This enables NixOS and nixpkgs to exist, and they have much longer manuals:
https://nixos.org/manual/nixos/stable/
https://nixos.org/manual/nixpkgs/stable/
So nix does one thing and does it very well.
Tangent. The "unix philosophy" isn't very true on Linux, and hasn't been since GNU. The problem with "do one thing and do it well" is that very often you need to do more than one thing. You then need to learn a completely different thing to do another basic operation.
Having one tool do literally everything is also unreasonable. But there are natural boundaries for things to exist. It is not unreasonable for the uniq to have a count tool, or for sort to have uniq.
I've been doing this for 20 years now, so I've very comfortable with Linux/Unix tooling. But I see new comers come on. It's often easier for them to script something completely from scratch in python then figure out how to stitch coreutils together.
Nix as a package manager is made up of multiple tools that interact, such as nix-env, nix-store, nix-shell, etc.
NixOS additionally has nixos-rebuild and other commands that are layered on top of those core Nix commands.