modules/cleanup.nix: orphan cleanup on every switch

Every module imports cleanup.nix (also exported as
homeManagerModules.cleanup), which
- puts steam-frame-nix-cleanup (install.sh cleanup) on PATH;
- runs `cleanup --orphans --quiet` after linkGeneration on every switch,
  keeping what the configuration still uses (steamFrame.cleanup.keep, set
  by the modules: debugger while steamvrDebugger is on, the Firefox desktop
  profile's user.js while its fix applies); in a dry run it runs with
  --dry-run;
- runs `cleanup --all` instead when Home Manager's `uninstall = true;` is
  set (the manual uninstall route);
- removes links of older versions at paths Home Manager is about to own
  before checkLinkTargets (steamFrame.cleanup.migrateLinks), which would
  count as collisions otherwise.

install.sh cleanup gains --quiet (only actions, deferrals and warnings;
the header only when something is printed). The Jellyfin module's own
removal of the old shim copy goes: cleanup does it.
This commit is contained in:
Pierre Kisters committed 2026-09-29 00:01:30 +02:00
1 parent 7255315b73
commit 1ad0dd751e
18 files changed
+115 -29

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ let
inherit description;
};
in {
imports = [ ./steam-ui-patches.nix ./steamvr-debugger.nix ];
imports = [ ./cleanup.nix ./steam-ui-patches.nix ./steamvr-debugger.nix ];
options.steamFrame.dashboard.frameControls = {
enable = lib.mkEnableOption ''