summary refs log tree commit diff
path: root/nixos/modules/services/x11/desktop-managers
diff options
context:
space:
mode:
authorBastian Köcher <git@kchr.de>2018-07-03 15:18:07 +0200
committerBastian Köcher <git@kchr.de>2018-07-03 15:18:07 +0200
commit8b3fb83160c68209e07914ac2201eb6fce9d727b (patch)
treede3cedfe2ca37168b90dcfdf2323cb823fe4397d /nixos/modules/services/x11/desktop-managers
parentea8b0fa1cc67aa91b05253547cf71dcbcfb8eb3b (diff)
downloadnixlib-8b3fb83160c68209e07914ac2201eb6fce9d727b.tar
nixlib-8b3fb83160c68209e07914ac2201eb6fce9d727b.tar.gz
nixlib-8b3fb83160c68209e07914ac2201eb6fce9d727b.tar.bz2
nixlib-8b3fb83160c68209e07914ac2201eb6fce9d727b.tar.lz
nixlib-8b3fb83160c68209e07914ac2201eb6fce9d727b.tar.xz
nixlib-8b3fb83160c68209e07914ac2201eb6fce9d727b.tar.zst
nixlib-8b3fb83160c68209e07914ac2201eb6fce9d727b.zip
services.plasma5: Update start menu with an activationScript
To update the plasma start menu `kbuildsyscoca5` needs to be executed.
There are several people complaining about missing applications in their
plasma start menu.
This patch adds a activationScript for plasma, that runs
`kbuildsyscoca5` for each user that has `isNormalUser` == `true`.
Diffstat (limited to 'nixos/modules/services/x11/desktop-managers')
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma5.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 91d091d7d7e2..4b9e561d53c8 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -221,6 +221,11 @@ in
       security.pam.services.sddm.enableKwallet = true;
       security.pam.services.slim.enableKwallet = true;
 
+      # Update the start menu for each user that has `isNormalUser` set.
+      system.activationScripts.plasmaSetup = stringAfter [ "users" "groups" ]
+        (concatStringsSep "\n"
+          (mapAttrsToList (name: value: "${pkgs.su}/bin/su ${name} -c kbuildsycoca5")
+            (filterAttrs (n: v: v.isNormalUser) config.users.users)));
     })
   ];