mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
targets/generic-linux: add enableKdeApplicationCache
This option allows home-manager to trigger kbuildsycoca to refresh the KDE .desktop file cache, making desktop applications appear in menus.
This commit is contained in:
parent
21b078306a
commit
c729ffe3b0
1 changed files with 16 additions and 0 deletions
|
@ -26,6 +26,14 @@ in {
|
|||
GNU/Linux distributions other than NixOS.
|
||||
'';
|
||||
};
|
||||
|
||||
enableKdeApplicationCache = mkEnableOption "" // {
|
||||
description = ''
|
||||
Whether to enable the management of the KDE application cache.
|
||||
When using KDE Plasma, desktop applications installed via
|
||||
home-manager may not appear in menus with this option disabled.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -103,5 +111,13 @@ in {
|
|||
TERMINFO_DIRS =
|
||||
"${profileDirectory}/share/terminfo:$TERMINFO_DIRS\${TERMINFO_DIRS:+:}${distroTerminfoDirs}";
|
||||
};
|
||||
|
||||
home.activation.updateKdeApplicationCache =
|
||||
if cfg.enableKdeApplicationCache then
|
||||
hm.dag.entryAfter [ "installPackages" ] ''
|
||||
run /usr/bin/kbuildsycoca5 --noincremental
|
||||
''
|
||||
else
|
||||
null;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue