From 14cb0c8cfaa28d62a0e0cb4829e921635cd2b296 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Tue, 31 Dec 2024 10:27:09 +0000 Subject: [PATCH] fnott: use config.wayland.systemd.target Also add missing `ConditionEnvironment`. --- modules/services/fnott.nix | 5 +++-- .../services/fnott/systemd-user-service-expected.service | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/services/fnott.nix b/modules/services/fnott.nix index ecbd0fd1..e63cb571 100644 --- a/modules/services/fnott.nix +++ b/modules/services/fnott.nix @@ -88,8 +88,9 @@ in { Unit = { Description = "Fnott notification daemon"; Documentation = "man:fnott(1)"; - After = [ "graphical-session-pre.target" ]; - PartOf = [ "graphical-session.target" ]; + After = [ config.wayland.systemd.target ]; + PartOf = [ config.wayland.systemd.target ]; + ConditionEnvironment = "WAYLAND_DISPLAY"; }; Service = { diff --git a/tests/modules/services/fnott/systemd-user-service-expected.service b/tests/modules/services/fnott/systemd-user-service-expected.service index c39a7b19..f6546df4 100644 --- a/tests/modules/services/fnott/systemd-user-service-expected.service +++ b/tests/modules/services/fnott/systemd-user-service-expected.service @@ -4,7 +4,8 @@ ExecStart=@fnott@/bin/fnott -c /home/hm-user/.config/fnott/fnott.ini Type=dbus [Unit] -After=graphical-session-pre.target +After=graphical-session.target +ConditionEnvironment=WAYLAND_DISPLAY Description=Fnott notification daemon Documentation=man:fnott(1) PartOf=graphical-session.target