3 ms·
What advantages has Nix over Flatpak? Seems to be just yet another esoteric solution for installing software? Why should one prefer it over other solutions? Ho
by PurpleRamen 4y ago
What advantages has Nix over Flatpak? Seems to be just yet another esoteric solution for installing software? Why should one prefer it over other solutions?
How well does Nix integrate packages into the system? Flatpak is integrating apps into the desktop environments. Probably just following standards, but is Nix doing this too?
Are Nix-Installations portable? I use Flatpak to have the same installation on different systems available, just move my SSD between them. How ell would this work with Nix?
- smoldesu 4y agoTheoretically, you could create a Nix-Flatpak hybrid by sourcing your Bubblewrap packages/environment from the Nix store. It wouldn't be much different from how Nix handles it today, just with an additional layer of sandboxing for each environment. The problem Nix solves is the one Flatpak tries working around - how do I guarantee software builds and runs on my system? The answer turns out to be "very strictly", and Nix has done a good job of writing sane rules where it can. It's not perfect (and definitely not user-friendly today) but it has a larger package repo to work with and better support for stuff Flatpak is missing like system services. If people do want to switch to an immutable root system, I'd hope the goal is to be as modular as NixOS is someday.
- FengLengshun 4y agoFrom my testing it seems to integrate well enough. Mind, I'm still only dipping my toes to Nix on Vanilla OS for now, but I could install `git` and I could run `git` directly without `flatpak run` and the likes. Optional dependencies seems to be an issue, though, as I needed to figure out what on my own I need to get thumbnails on Dolphin working correctly, but I might still be missing something that I'm supposed to do in this case. As for portability, it seems doable with home-manager: https://julianhofer.eu/blog/01-silverblue-nix/#home-manager https://julianhofer.eu/blog/01-silverblue-nix/#home-manager (itsfoss also have a pretty good NixOS guide that will cover home-manager as well).
- ar_lan 4y ago> What advantages has Nix over Flatpak? Seems to be just yet another esoteric solution for installing software? Why should one prefer it over other solutions? It's not just for installing software - I have a declarative, shared configuration for each software that works deterministically on each system I share it with (NixOS or not). > Are Nix-Installations portable? I use Flatpak to have the same installation on different systems available, just move my SSD between them. How ell would this work with Nix? No, but the configurations are (see earlier response), so this seems to be the same benefit here. > How well does Nix integrate packages into the system? Flatpak is integrating apps into the desktop environments. Probably just following standards, but is Nix doing this too? I don't exactly know how to answer this - and it's probably partially because I don't use many modern desktop environments (when on NixOS I use i3, otherwise I'm on macOS, which is a bit of a specialized usecase). So I can't really comment here. As far as installing immutable packages accessible from the system - it does a pretty exceptional job.