FHS-violating package managers on Silverblue: nix, guix, snapd?

Hi, team silverblue!

I wonder if there is currently possible, maybe with some workarounds, to use nix, guix, snapd on Fedora Silverblue. They all require non-FHS mount points like /nix .

1 Like

I’ve not played with any of those, but I have had some luck using packages distributed as AppImages on Silverblue without much issue. If something’s not available through flatpak, I tend to try to find an AppImage for it.

1 Like

See Support empty toplevel mount points · Issue #337 · coreos/rpm-ostree · GitHub and Make it easier to link in or bind folders to root directory? · Issue #1711 · coreos/rpm-ostree · GitHub

1 Like

Thank you. Would be great to see it done. Fedora silverblue is awesome technology

Actually, you can use snaps on Silverblue too:

rpm-ostree install snapd
chattr -i / && ln -s /var/lib/snapd/snap /snap
2 Likes

Rather than manually creating the symlink, the better way would probably be to use systemd-tmpfiles, which is used to create some of the other symlinks on the system.

Hi @refi64, how can I use systemd-tmpfiles to create /nix?

I think the better route would be to use one of the rootless install methods described here. Nix won’t allow /nix to be a symlink by default because it can cause issues with source builds.

2 Likes

Thanks, @refi64! It worked!

1 Like

Hi @refi64 , interesting thread. I’m the maintainer for the Dwarf Fortress Classic snap and I’ve been using VMs for a while to update and manage it. Is it possible to use a rootless method to install snapd and snaps? Or would it be better to use the method outlined by @pwtail above?

I can stick to VMs, it’s not a blocker for me but any help would be appreciated, thanks!

I’ve tried a lot of solutions. The best ones I could find were:

  1. GitHub - DavHau/nix-portable: Nix - Static, Permissionless, Installation-free, Pre-configured, which uses our beloved bubblewrap to bind-mount ~/.nix-portable on/nix into a userspace container when executing nix binaries.
  2. https://containertoolbx.org/, which lets you work like in a normal Fedora whithin a container.

The worst part is https://direnv.net/ and IDE integration because none of both solutions will make binaries available in the same paths as within the containers.

To solve that, using option 2 (toolbx):

  1. toolbox run sudo dnf install -y codium (after following instructions from VSCodium - Open Source Binaries of VSCode within the toolbx)
  2. Install Flathub—An app store and build service for Linux
  3. Use AppEditor to create a system app that executes toolbox run codium

There you have an IDE running inside a normal Fedora distro, where you can install nix and other packages as usual. The terminal is also within that environment, so all just works.

If you need to run podman containers but you are within the toolbx, the easiest way is:

  1. Outside the toolbx: systemctl enable --user --now podman.socket
  2. Inside the toolbx: sudo dnf install -y podman-remote

Now you can use it inside toolbx: toolbox run podman-remote run --rm docker.io/hello-world

1 Like

I would like to use Guix on Silverblue. Could someone give me instructions on how to do this?