about summary refs log tree commit diff
path: root/nixos/modules/services
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-03-02 11:17:58 +0300
committerK900 <me@0upti.me>2024-03-02 11:26:41 +0300
commitd7a4bf599859b259331d5b25abaf93568846283c (patch)
treecb6bf2cbb83b6c227e260cf0bd56727c10bfc75a /nixos/modules/services
parentdf41961bd4b7e838cb997543ea1297f4cbd7da15 (diff)
downloadnixlib-d7a4bf599859b259331d5b25abaf93568846283c.tar
nixlib-d7a4bf599859b259331d5b25abaf93568846283c.tar.gz
nixlib-d7a4bf599859b259331d5b25abaf93568846283c.tar.bz2
nixlib-d7a4bf599859b259331d5b25abaf93568846283c.tar.lz
nixlib-d7a4bf599859b259331d5b25abaf93568846283c.tar.xz
nixlib-d7a4bf599859b259331d5b25abaf93568846283c.tar.zst
nixlib-d7a4bf599859b259331d5b25abaf93568846283c.zip
nixos/plasma6: nuke sycoca on activation
This is not the right solution, but it should get us going for now.
Diffstat (limited to 'nixos/modules/services')
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma6.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma6.nix b/nixos/modules/services/x11/desktop-managers/plasma6.nix
index 8d84c5a7431b..1237261e0af7 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma6.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma6.nix
@@ -10,6 +10,11 @@
 
   inherit (pkgs) kdePackages;
   inherit (lib) literalExpression mkDefault mkIf mkOption mkPackageOptionMD types;
+
+  activationScript = ''
+    # will be rebuilt automatically
+    rm -fv $HOME/.cache/ksycoca*
+  '';
 in {
   options = {
     services.xserver.desktopManager.plasma6 = {
@@ -273,5 +278,14 @@ in {
     };
 
     programs.kdeconnect.package = kdePackages.kdeconnect-kde;
+
+    # FIXME: ugly hack. See #292632 for details.
+    system.userActivationScripts.rebuildSycoca = activationScript;
+    systemd.user.services.nixos-rebuild-sycoca = {
+      description = "Rebuild KDE system configuration cache";
+      wantedBy = [ "graphical-session-pre.target" ];
+      serviceConfig.Type = "oneshot";
+      script = activationScript;
+    };
   };
 }