mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29: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 = {
|
||||
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 {
|
||||
type = themeType;
|
||||
default = hicolorTheme;
|
||||
description = "Set the icon theme.";
|
||||
};
|
||||
|
||||
waylandDisplay = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description =
|
||||
"Set the service's <envar>WAYLAND_DISPLAY</envar> 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}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue