kanshi: use config.wayland.systemd.target

Also add `ConditionEnvironment`.
This commit is contained in:
Thiago Kenji Okada
2024-12-31 10:01:57 +00:00
committed by Austin Horstman
parent bf60c0be78
commit 16570f88c4

View File

@@ -288,7 +288,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;