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