From d3c500a8f8f88587c0867ba13ae6dba6e3c58cec Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 31 Dec 2024 10:01:57 +0000 Subject: [PATCH] kanshi: use config.wayland.systemd.target Also add `ConditionEnvironment`. --- modules/services/kanshi.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/services/kanshi.nix b/modules/services/kanshi.nix index 80896628..45394498 100644 --- a/modules/services/kanshi.nix +++ b/modules/services/kanshi.nix @@ -286,7 +286,8 @@ in { systemdTarget = mkOption { type = types.str; - default = "sway-session.target"; + default = config.wayland.systemd.target; + defaultText = literalExpression "config.wayland.systemd.target"; description = '' Systemd target to bind to. ''; @@ -342,6 +343,7 @@ in { Unit = { Description = "Dynamic output configuration"; Documentation = "man:kanshi(1)"; + ConditionEnvironment = "WAYLAND_DISPLAY"; PartOf = cfg.systemdTarget; Requires = cfg.systemdTarget; After = cfg.systemdTarget;