mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
dunst: add service package option (#1944)
* add service package option * add waylandDisplay option dunst now supports wayland, and looks for WAYLAND_DISPLAY var to use it Co-authored-by: @li:maisiliym.uniks <@li:maisiliym.uniks>
This commit is contained in:
parent
c2c26120d7
commit
827636c619
1 changed files with 17 additions and 1 deletions
|
@ -57,12 +57,26 @@ in {
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = mkEnableOption "the dunst notification daemon";
|
enable = mkEnableOption "the dunst notification daemon";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.dunst;
|
||||||
|
defaultText = literalExample "pkgs.dunst";
|
||||||
|
description = "Package providing <command>dunst</command>.";
|
||||||
|
};
|
||||||
|
|
||||||
iconTheme = mkOption {
|
iconTheme = mkOption {
|
||||||
type = themeType;
|
type = themeType;
|
||||||
default = hicolorTheme;
|
default = hicolorTheme;
|
||||||
description = "Set the icon theme.";
|
description = "Set the icon theme.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
waylandDisplay = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "";
|
||||||
|
description =
|
||||||
|
"Set the service's <envar>WAYLAND_DISPLAY</envar> environment variable.";
|
||||||
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types; attrsOf (attrsOf eitherStrBoolIntList);
|
type = with types; attrsOf (attrsOf eitherStrBoolIntList);
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -140,7 +154,9 @@ in {
|
||||||
Service = {
|
Service = {
|
||||||
Type = "dbus";
|
Type = "dbus";
|
||||||
BusName = "org.freedesktop.Notifications";
|
BusName = "org.freedesktop.Notifications";
|
||||||
ExecStart = "${pkgs.dunst}/bin/dunst";
|
ExecStart = "${cfg.package}/bin/dunst";
|
||||||
|
Environment = optionalString (cfg.waylandDisplay != "")
|
||||||
|
"WAYLAND_DISPLAY=${cfg.waylandDisplay}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue