NixPkgs as an alternative to Flatpak or Snap

Can I rant for a second about how I am not of fan Flatpak and Snap? They appear to have looked at how Windows does things super poorly and were like, oh oh, that makes sense, lets do that! To be fair, that was not their motivation, they were motivated, doubtless, by similar motivations Microsoft had…it still sucks though. I’d like to embrace what Linux does better, and not evolve more similar to Windows because it is what is at the bottom of the slippery slope.

Nix as a package manager, seems to me like an actually good way of doing much of what Flatpak and Snap were trying to achieve.

1 Like

I think the problem they are trying to solve isn’t an exact match for the problems that nix is trying to solve.

Flatpack, snaps, and appimage are trying to deliver programs, usually a user experience (GUI application).

Docker tries to provide an isolated runtime environment, and the need for a cohesive runtime environment is just a requirement.

Nix is trying to capture everything which goes into build a piece of software (derivation). And a cohesive environment is the output of doing the build.

The two “worlds” do intersect that the runtime of a program is [usually] context independent. Meaning, they should be able to run without concern of what’s on the host OS. However, runtime isolation is not a goal of nix, and is usually delegated to something like systemd.

It is also immensely appealing for many vendors to have more assurance about what they are delivering to customers. Platforms like flatpack do allow for the individual vendors to take ownership, over some 3rd party maintainer (e.g. debian, ubuntu, fedora, nix maintainer).

3 Likes
Hosted by Flying Circus.