Files
lhns--steam-frame-nix/modules/screenshots/package.nix
T
Pierre Kisters 26641d76a0 SteamVR screenshots linked into ~/Pictures
Steam keeps VR screenshots (Steam button + trigger) in
~/.local/share/Steam/userdata/<account ID>/760/remote/250820/screenshots,
where Dolphin, Gwenview and the file pickers don't look.

screenshots (module screenshots, opt-in) links ~/Pictures/<name> (default
"SteamVR Screenshots") there. The account ID comes from steamUserId, or,
unset, at runtime: the Home Manager link points to
<runtimeDir>/steam-frame-nix/screenshots (tmpfs), which the oneshot user
service steam-frame-nix-screenshots points to the account last logged in
(loginusers.vdf MostRecent, else latest timestamp, else the only userdata
folder), on switch, at login and when loginusers.vdf or userdata changes.

install.sh cleanup knows the tmpfs link (--keep screenshots while used).
Flake checks: account detection on fake Steam dirs; cleanup of the link.
2026-09-30 22:54:13 +02:00

12 lines
492 B
Nix

# steam-frame-nix-screenshots: link.sh with the outer runtime dir and the
# Steam directory (both overridable by environment, for the check).
{ lib, pkgs, runtimeDir, steam }:
pkgs.writeShellApplication {
name = "steam-frame-nix-screenshots";
runtimeInputs = [ pkgs.coreutils pkgs.gawk ];
text = ''
runtime=''${STEAM_FRAME_NIX_RUNTIME_DIR:-${lib.escapeShellArg runtimeDir}}
steam=''${STEAM_FRAME_NIX_STEAM_DIR:-${lib.escapeShellArg steam}}
'' + builtins.readFile ./link.sh;
}