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 ]; }; }