From ce45f19e8acb43e5f02888d873d451e2f994546b Mon Sep 17 00:00:00 2001 From: Flameopathic <64027365+Flameopathic@users.noreply.github.com> Date: Thu, 10 Apr 2025 03:42:28 -0400 Subject: [PATCH] kde: add run wrapper (#1117) Closes: https://github.com/danth/stylix/issues/313 Link: https://github.com/danth/stylix/pull/1117 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: awwpotato <153149335+awwpotato@users.noreply.github.com> --- docs/src/modules.md | 8 ++++++++ modules/kde/hm.nix | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/src/modules.md b/docs/src/modules.md index 153e62ee..4c8de664 100644 --- a/docs/src/modules.md +++ b/docs/src/modules.md @@ -208,3 +208,11 @@ This will be inserted before the automatically generated list of options. Adding [testbeds](./testbeds.md) for new modules is encouraged, but not mandatory. + +## Common Mistakes + +### `home.activation` Scripts + +Any script run by `home.activation` must be preceded by `run` if the script is +to produce any permanent changes. Without this `run` wrapper, the script is run +in dry-run mode. diff --git a/modules/kde/hm.nix b/modules/kde/hm.nix index 5dc01f67..90c47d36 100644 --- a/modules/kde/hm.nix +++ b/modules/kde/hm.nix @@ -370,7 +370,7 @@ in # This activation entry will run the theme activator when the homeConfiguration is activated activation.stylixLookAndFeel = lib.hm.dag.entryAfter [ "writeBoundary" ] '' - ${activator} || verboseEcho \ + run ${activator} || verboseEcho \ "Stylix KDE theme setting failed. This only works in a running Plasma session." ''; };