mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 01:00:13 +02:00
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.
29 lines
828 B
Nix
29 lines
828 B
Nix
# Hide desktop entries from the "+" menu and the KDE menu: a user entry with
|
|
# Hidden=true masks the system one.
|
|
{ config, lib, ... }: {
|
|
imports = [
|
|
./cleanup.nix
|
|
(lib.mkRenamedOptionModule
|
|
[ "steamFrame" "hiddenApps" ] [ "steamFrame" "launcherMenu" "hiddenApps" ])
|
|
];
|
|
|
|
options.steamFrame.launcherMenu.hiddenApps = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [ ];
|
|
example = [ "lxterminal" "cmake-gui" "firewall-config" "renderdoc" ];
|
|
description = ''
|
|
Desktop entry ids (without .desktop) to hide from the "+" menu and the
|
|
KDE menu.
|
|
'';
|
|
};
|
|
|
|
config.xdg.dataFile = lib.genAttrs
|
|
(map (id: "applications/${id}.desktop") config.steamFrame.launcherMenu.hiddenApps)
|
|
(_: {
|
|
text = ''
|
|
[Desktop Entry]
|
|
Hidden=true
|
|
'';
|
|
});
|
|
}
|