dunst: add systemd target option

This commit is contained in:
Ryan Horiguchi 2023-07-11 21:35:25 +02:00
parent b2ac1d2c32
commit be1b32025c

View file

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