diff --git a/modules/services/wlsunset.nix b/modules/services/wlsunset.nix index 8b1d7201c..8ffb3665b 100644 --- a/modules/services/wlsunset.nix +++ b/modules/services/wlsunset.nix @@ -131,6 +131,7 @@ in Description = "Day/night gamma adjustments for Wayland compositors."; After = [ cfg.systemdTarget ]; PartOf = [ cfg.systemdTarget ]; + ConditionEnvironment = "WAYLAND_DISPLAY"; }; Service = { diff --git a/tests/modules/services/wlsunset/wlsunset-service-expected.service b/tests/modules/services/wlsunset/wlsunset-service-expected.service index 1ea58c19b..3bcf17c85 100644 --- a/tests/modules/services/wlsunset/wlsunset-service-expected.service +++ b/tests/modules/services/wlsunset/wlsunset-service-expected.service @@ -6,5 +6,6 @@ ExecStart=@wlsunset@/bin/wlsunset -L128.8 -T6000 -g0.6 -l12.3 -t3500 [Unit] After=test.target +ConditionEnvironment=WAYLAND_DISPLAY Description=Day/night gamma adjustments for Wayland compositors. PartOf=test.target