From eae9d7a6b5d217f3d51f70ea1f6e0eb6e23554c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Sat, 18 Oct 2025 14:57:46 -0400 Subject: [PATCH] nixos/plasma6: check `$XDG_CACHE_HOME` before `$HOME/.cache` for ksycoca cache wipe The previous implementation breaks if `$XDG_CACHE_HOME` is set to anything other than what is expected, since KDE will now write the cache there instead. Some users set `$XDG_CACHE_HOME` to something like `$HOME/.local/cache` to de-clutter `$HOME`. In such case, the cache won't be found and removed, which will cause the KDE runner to not be able to launch anything. It will now work regardless. --- doc/release-notes/rl-2511.section.md | 2 ++ nixos/modules/services/desktop-managers/plasma6.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index 4862081c6529..4c44f3df3821 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -298,6 +298,8 @@ - `buildPythonPackage` and `buildPythonApplication` now default to `nix-update-script` as their default `updateScript`. This should improve automated updates, since nix-update is better maintained than the in-tree update script and has more robust fetcher support. +- `plasma6`: Fixed the `ksycoca` cache not being re-built when `$XDG_CACHE_HOME` is set to something that isn't `$HOME/.cache`. + ## Nixpkgs Library {#sec-nixpkgs-release-25.11-lib} diff --git a/nixos/modules/services/desktop-managers/plasma6.nix b/nixos/modules/services/desktop-managers/plasma6.nix index 529734bd503f..fea0428f36d1 100644 --- a/nixos/modules/services/desktop-managers/plasma6.nix +++ b/nixos/modules/services/desktop-managers/plasma6.nix @@ -20,7 +20,7 @@ let activationScript = '' # will be rebuilt automatically - rm -fv "$HOME/.cache/ksycoca"* + rm -fv "''${XDG_CACHE_HOME:-$HOME/.cache}/ksycoca"* ''; in {