mirror of
https://github.com/nix-community/home-manager
synced 2025-01-11 19:49:49 +01:00
dunst: add option to read alternative configuration file (#2113)
This commit is contained in:
parent
b0d769691c
commit
59be1f4983
1 changed files with 18 additions and 2 deletions
|
@ -64,6 +64,21 @@ in {
|
||||||
description = "Package providing <command>dunst</command>.";
|
description = "Package providing <command>dunst</command>.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configFile = mkOption {
|
||||||
|
type = with types; either str path;
|
||||||
|
default = "${config.xdg.configHome}/dunst/dunstrc";
|
||||||
|
defaultText = "$XDG_CONFIG_HOME/dunst/dunstrc";
|
||||||
|
description = ''
|
||||||
|
Path to the configuration file read by dunst.
|
||||||
|
</para><para>
|
||||||
|
Note that the configuration generated by Home Manager will be
|
||||||
|
written to <filename>$XDG_CONFIG_HOME/dunst/dunstrc</filename>
|
||||||
|
regardless. This allows using a mutable configuration file generated
|
||||||
|
from the immutable one, useful in scenarios where live reloading is
|
||||||
|
desired.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
iconTheme = mkOption {
|
iconTheme = mkOption {
|
||||||
type = themeType;
|
type = themeType;
|
||||||
default = hicolorTheme;
|
default = hicolorTheme;
|
||||||
|
@ -88,7 +103,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
default = { };
|
default = { };
|
||||||
description = "Configuration written to ~/.config/dunst/dunstrc";
|
description =
|
||||||
|
"Configuration written to <filename>$XDG_CONFIG_HOME/dunst/dunstrc</filename>.";
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
global = {
|
global = {
|
||||||
|
@ -165,7 +181,7 @@ in {
|
||||||
Service = {
|
Service = {
|
||||||
Type = "dbus";
|
Type = "dbus";
|
||||||
BusName = "org.freedesktop.Notifications";
|
BusName = "org.freedesktop.Notifications";
|
||||||
ExecStart = "${cfg.package}/bin/dunst";
|
ExecStart = "${cfg.package}/bin/dunst -config ${cfg.configFile}";
|
||||||
Environment = optionalString (cfg.waylandDisplay != "")
|
Environment = optionalString (cfg.waylandDisplay != "")
|
||||||
"WAYLAND_DISPLAY=${cfg.waylandDisplay}";
|
"WAYLAND_DISPLAY=${cfg.waylandDisplay}";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue