Adding non-Steam games to Steam Flatpak

Hi all! It’s my first post here and I hope I’m making it in a correct category and in a proper manner. Thank you for your time in advance! I’ve recently moved to NixOS so I’m pretty new.

I’ve decided to try running flatpak version of Steam, and it has been working well so far, but I can’t figure out how to add a non-steam game to it.

When I open the “add non-steam game” window, Steam does not seem to see any applications to add. I think it is most probably because unlike native package it is not looking in correct PATH locations.

To rectify it I’ve tried the following using Flatseal:

  1. Allowed access to “All system libraries” and “All system configurations”. Couldn’t allow “All system files” or “All user files”, as it stops starting to prevent accidental data loss.
  2. Explicitly added /run/current-system/sw as allowed path in “Other files”
  3. Added it to PATH env variable too: PATH=/app/bin:/app/utils/bin:/usr/bin:/run/current-system/sw/bin

I still get an empty screen when trying to add a Non-Steam game. I’ve also tried browsing and explicitly adding it, but instead of correct path /run/current-system/sw/bin/XIVLauncher.Core I get a malformed one /run/user/1000/doc/f5b408d0/XIVLauncher.Core and the application does not launch.

At this point I’m ready to go back to native, but I do enjoy slightly better stability of a flatpak version on my particular system.

Any advice? I feel like I’m missing something obvious due to being a total Nix noob.

E: had a typo in one of the paths

Steam doesn’t grab binaries from $PATH, it uses .desktop files to figure out what can be executed, which live in the various directories under $XDG_DATA_DIRS. You’d need to pass that variable to steam somehow, no idea how it processes it or if there are patches in the NixOS version that help with that.

You probably won’t get any native NixOS things to execute under flatpak without some heavy hacks, since they don’t expect libraries to be where they are in the flatpak environment. I’d guess this is why your manually added binary doesn’t work.

Have you installed steam with programs.steam.enable? The differences between “native” and flatpak versions of steam should be very minimal, since steam bootstraps the same runtime in either case. There’s virtually no difference in the actually running code, except for the sandboxing. Fully deleting the steam directory so it properly re-bootstraps itself might help.