1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-17 03:58:30 +02: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:
Sumner Evans 2021-04-24 23:56:48 -06:00 committed by GitHub
parent c2c26120d7
commit 827636c619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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