I have quite a few grips when it comes to the alternatives to what I did here i.e., flatpak, snap, and appimages, moreso with the sandboxes of the first two.
Flatpak's sandbox tends to interfere and causes issues with applications that don't occur with their system installs. So unless you specifically built the app for Flatpak, you tend to run into issues. One example would be with Vivecraft and minecraft launchers, the mod doesn't fully work from a flatpak launchers as the VR mode needs SteamVR or similar, it works fine from a system installed launcher though.
Snap's just a mess, I never looked into it much… All I know is that it creates a lot of loopback devices and, at least when I used to use it, each snap would show up in software like gparted.
Appimages are moreso a mess on Ubuntu, but Canonical has basically made that entire OS problomatic outisde of server usage. A lot of appimages require fuse2 on the system, which recent Ubuntu doesn't have, and in other appimages, like Orcaslicer, they don't include libaries that are needed for them to run i.e. webkit2gtk and gstreamer. they need to be installed on the system.
While I don't know of any other solutions that are still maintained, an idea came to me from the NixOS world with their nix flakes and nix shells. (Keep in mind I know little to nothing about nix…) I previously tried to use nix shells for dotfiles, which required adding my user to the nixbld group and was too much of a hassle for what it's worth. The main issue I ran into is that if I was using wofi installed in a nix shell, some apps didn't work right, such as chromium, vim, and htop.
And this is where my POC comes in for this. It seems doing it for applications work out a lot better than with system things such as waybar and wofi. I still needed a wrapper for gparted, but chromium I didn't. I have the files here: https://github.com/Nathan22211/nix-flake-apps-POC If you want to run them, make sure you have flakes enabled and run nix develop in one of the folders on your system. I will note that for gparted the gtk polkit UI will note the full path to where gparted is in nix store for some reason… I haven't fixed that yet…
While I know basically jack about nix, there is some obvious advantages to this:
- The sandbox of flatpak and snap aren't getting in the way of functions that typically work in system installations, as nix only manages the dependencies and not the whole runtime system.
- the dependencies are downloaded rather than bundled into one file, which I hear is why orcaslicer doesn't bundle some libraries.
- Nix can still (potentially, I haven't tested) add udev rules and other things that need to be manually done for flatpaks
Though the main downside is probably the lack of a sandbox also can let malware in, though that same sandboxing system can easily be added to flakes for apps where vulnerabilities abound, such as chromium. Then again, I don't think flatpak has been heavily pentested, both in its runtime and in its application vetting.
this could definitely use improvement, maybe someone more familiar with nix as a whole can give me some insight, as I'm an arch user at heart and have never touched NixOS.