From be1b32025c624d225f7c94b03350a876303ba742 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Tue, 11 Jul 2023 21:35:25 +0200 Subject: [PATCH] dunst: add systemd target option --- modules/services/dunst.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index daa800cf0..0c3bf79af 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -64,6 +64,15 @@ in { description = "Package providing {command}`dunst`."; }; + systemdTarget = mkOption { + type = types.str; + default = "graphical-session.target"; + example = "sway-session.target"; + description = '' + Systemd target to bind to. + ''; + }; + configFile = mkOption { type = with types; either str path; default = "${config.xdg.configHome}/dunst/dunstrc"; @@ -192,6 +201,8 @@ in { Environment = optionalString (cfg.waylandDisplay != "") "WAYLAND_DISPLAY=${cfg.waylandDisplay}"; }; + + Install.WantedBy = [ cfg.systemdTarget ]; }; }