diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix
index 60842a16..90c3160f 100644
--- a/modules/services/dunst.nix
+++ b/modules/services/dunst.nix
@@ -57,12 +57,26 @@ in {
services.dunst = {
enable = mkEnableOption "the dunst notification daemon";
+ package = mkOption {
+ type = types.package;
+ default = pkgs.dunst;
+ defaultText = literalExample "pkgs.dunst";
+ description = "Package providing dunst.";
+ };
+
iconTheme = mkOption {
type = themeType;
default = hicolorTheme;
description = "Set the icon theme.";
};
+ waylandDisplay = mkOption {
+ type = types.str;
+ default = "";
+ description =
+ "Set the service's WAYLAND_DISPLAY environment variable.";
+ };
+
settings = mkOption {
type = with types; attrsOf (attrsOf eitherStrBoolIntList);
default = { };
@@ -140,7 +154,9 @@ in {
Service = {
Type = "dbus";
BusName = "org.freedesktop.Notifications";
- ExecStart = "${pkgs.dunst}/bin/dunst";
+ ExecStart = "${cfg.package}/bin/dunst";
+ Environment = optionalString (cfg.waylandDisplay != "")
+ "WAYLAND_DISPLAY=${cfg.waylandDisplay}";
};
};
}