diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-03-11 22:58:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 22:58:40 -0400 |
commit | 7890494813dd7fa5bca6cb30597097d7280f44a3 (patch) | |
tree | 72ae91f73b153ace8828da3f0fed8e2b7a5a524f /nixos | |
parent | c3cb5933f8d4467f2d4d0f4334f42e13a53a04c6 (diff) | |
parent | 393b359f13f1685c1a1d4bae4f89fa0ead726ce5 (diff) | |
download | nixlib-7890494813dd7fa5bca6cb30597097d7280f44a3.tar nixlib-7890494813dd7fa5bca6cb30597097d7280f44a3.tar.gz nixlib-7890494813dd7fa5bca6cb30597097d7280f44a3.tar.bz2 nixlib-7890494813dd7fa5bca6cb30597097d7280f44a3.tar.lz nixlib-7890494813dd7fa5bca6cb30597097d7280f44a3.tar.xz nixlib-7890494813dd7fa5bca6cb30597097d7280f44a3.tar.zst nixlib-7890494813dd7fa5bca6cb30597097d7280f44a3.zip |
Merge pull request #57037 from matthewbauer/remove-xdg-desktop-menu-dummy
plasma: handle kbuildsycoca5 better
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/plasma5.nix | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index ace9dd5321be..e5be9bf27692 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -226,7 +226,29 @@ in security.pam.services.slim.enableKwallet = true; # Update the start menu for each user that is currently logged in - system.userActivationScripts.plasmaSetup = "${pkgs.libsForQt5.kservice}/bin/kbuildsycoca5"; + system.userActivationScripts.plasmaSetup = '' + # The KDE icon cache is supposed to update itself + # automatically, but it uses the timestamp on the icon + # theme directory as a trigger. Since in Nix the + # timestamp is always the same, this doesn't work. So as + # a workaround, nuke the icon cache on login. This isn't + # perfect, since it may require logging out after + # installing new applications to update the cache. + # See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html + rm -fv $HOME/.cache/icon-cache.kcache + + # xdg-desktop-settings generates this empty file but + # it makes kbuildsyscoca5 fail silently. To fix this + # remove that menu if it exists. + rm -fv $HOME/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu + + # Remove the kbuildsyscoca5 cache. It will be regenerated + # immediately after. This is necessary for kbuildsyscoca5 to + recognize that software that has been removed. + rm -fv $HOME/.cache/ksycoca* + + ${pkgs.libsForQt5.kservice}/bin/kbuildsycoca5 + ''; }) ]; |