mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 05:00:24 +02:00
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:
1 parent
7255315b73
commit
1ad0dd751e
18 files changed
+115
-29
No files matched your search
@@ -119,6 +119,8 @@ let
|
||||
--file-forwarding org.mozilla.firefox "''${profile[@]}" "$@"
|
||||
'');
|
||||
in {
|
||||
imports = [ ./cleanup.nix ];
|
||||
|
||||
options.steamFrame.firefox = {
|
||||
enable = lib.mkEnableOption ''
|
||||
the Firefox Flatpak (org.mozilla.firefox) launcher with Steam Frame
|
||||
@@ -167,6 +169,8 @@ in {
|
||||
# Always, so disabling removes our user.js links (and old copies).
|
||||
home.activation.firefoxProfiles =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] "run ${profileSync}\n";
|
||||
# The desktop profile's user.js link (steam-frame-nix-cleanup).
|
||||
steamFrame.cleanup.keep = lib.optional desktopFix "firefox-desktop-userjs=${cfg.desktopProfile}";
|
||||
}
|
||||
(lib.mkIf cfg.enable {
|
||||
# stable: the branch the launcher runs (the extension point has no
|
||||
|
||||
Reference in new issue
Block a user