From e99a9e4a96873a45e139a4f244e6d53d362c2098 Mon Sep 17 00:00:00 2001 From: Pierre Kisters <1524059+lhns@users.noreply.github.com> Date: Thu, 1 Oct 2026 04:09:06 +0200 Subject: [PATCH] Cleanup: the artifact list lives in docs/cleanup.md only install.sh's header comment repeated docs/cleanup.md's table; it points there now. The script's tool list names grep, sed and awk too. --- docs/cleanup.md | 6 +++--- install.sh | 44 ++++++++------------------------------------ modules/cleanup.nix | 2 +- 3 files changed, 12 insertions(+), 40 deletions(-) diff --git a/docs/cleanup.md b/docs/cleanup.md index b9e9fae..04e9ed2 100644 --- a/docs/cleanup.md +++ b/docs/cleanup.md @@ -11,9 +11,9 @@ writes outside the Nix store, how to remove it, rollback and uninstall: imported by every module) is `install.sh cleanup`, so the same code runs with Nix (on every switch: `cleanup --orphans --keep `) and without it, from the script (bash, coreutils, findutils, -jq, all in SteamOS' `/usr/bin`). Home Manager's `uninstall = true;` runs -`cleanup --all` from the activation. `--quiet` prints only actions, -deferrals and warnings. +grep, sed, awk, jq, all in SteamOS' `/usr/bin`). Home Manager's +`uninstall = true;` runs `cleanup --all` from the activation. `--quiet` +prints only actions, deferrals and warnings. It removes an artifact only when it is proven to be its own; anything else is reported as "left alone" and never touched: diff --git a/install.sh b/install.sh index 027dc38..a749b61 100755 --- a/install.sh +++ b/install.sh @@ -67,7 +67,8 @@ Commands: cleanup [--dry-run] [--quiet] (--all | --orphans [--keep ]...) Remove what steam-frame-nix (any version) wrote outside the Nix store, only where it is provably its own; everything else is reported as - "left alone". Safe to re-run. Needs bash, coreutils, findutils, jq. + "left alone". Safe to re-run. Needs bash, coreutils, findutils, + grep, sed, awk, jq. --all everything, incl. the dashboard patches' saved choices (~/.local/state/steam-frame-nix/ui-patches). Use after rolling back to a generation without steam-frame-nix, @@ -384,41 +385,12 @@ EOF # --- cleanup ---------------------------------------------------------------- # -# Everything steam-frame-nix (any version) ever wrote outside the Nix store -# and Home Manager's own links, and how it is proven to be ours: -# -# debugger VRWebHelper.DebuggerEnabled in steamvr.vrsettings. Proof: -# $SFN_STATE/steamvr-debugger.armed (holds the value before; -# older versions: the empty marker steamvr-debugger, value -# before = absent). Restored once SteamVR is stopped; while it -# runs a runtime drop-in restores it when SteamVR stops. -# Also the runtime drop-in and restore script themselves. -# icons links hicolor/scalable/apps/.svg -> Breeze in the store -# (the icon-fallbacks script of 2026-09; manifest -# $SFN_STATE/icon-fallbacks). -# firefox user.js in Firefox profiles: links to -# /app/etc/firefox/steam-frame-nix-desktop-user.js (the -# wrapper's, while the desktop profile runs; left alone while -# the profile is in use), older links to *-firefox-*user.js and -# copies starting with FF_MARKER, and the values they left in -# prefs.js (only with Firefox closed). -# jellyfin the hwdec shim entries in the Jellyfin Flatpak's user override -# (nix-flatpak), an empty override file, and the shim copy of -# earlier versions (marker $SFN_STATE/jellyfin-hwdec-shim). -# ui-state the dashboard patches' saved choices -# ($SFN_STATE/ui-patches/.json; --all only, never -# --orphans) and stray *.json.tmp files. -# launchers entries of steamFrame.launchers in -# $OUTER_RUNTIME_DIR/steam-frame-nix/applications (tmpfs; --all -# only: the switch's own run removes those of removed launchers). -# screenshots the link $OUTER_RUNTIME_DIR/steam-frame-nix/screenshots -# (tmpfs) to a SteamVR screenshot folder -# (*/userdata//760/remote/250820/screenshots). -# dirs $SFN_STATE and $OUTER_RUNTIME_DIR/steam-frame-nix when empty. -# -# --orphans keeps what the current configuration still uses (--keep ...); -# the Home Manager module runs it on every switch. Anything not proven ours -# is reported as "left alone" and never touched. +# Every artifact any version of steam-frame-nix wrote outside the Nix store +# and Home Manager's links, and how each is proven to be ours (the +# clean_ functions below): docs/cleanup.md. Anything not proven +# ours is reported as "left alone" and never touched. --orphans keeps what +# the current configuration still uses (--keep ...); the Home Manager module +# runs it on every switch. SFN_STATE="${XDG_STATE_HOME:-$HOME/.local/state}/steam-frame-nix" SFN_DATA="${XDG_DATA_HOME:-$HOME/.local/share}" diff --git a/modules/cleanup.nix b/modules/cleanup.nix index 5db1f2e..944bd98 100644 --- a/modules/cleanup.nix +++ b/modules/cleanup.nix @@ -1,5 +1,5 @@ # Cleanup of what steam-frame-nix writes outside the Nix store (install.sh -# cleanup, see there for the list). Imported by every module. +# cleanup; what and how: docs/cleanup.md). Imported by every module. # - steam-frame-nix-cleanup on PATH (e.g. `steam-frame-nix-cleanup --all` # before removing steam-frame-nix from a configuration). # - On every switch, `cleanup --orphans` removes what the configuration no