mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 10:19:48 +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>.";
|
||||
};
|
||||
|
||||
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 {
|
||||
type = themeType;
|
||||
default = hicolorTheme;
|
||||
|
@ -88,7 +103,8 @@ in {
|
|||
};
|
||||
};
|
||||
default = { };
|
||||
description = "Configuration written to ~/.config/dunst/dunstrc";
|
||||
description =
|
||||
"Configuration written to <filename>$XDG_CONFIG_HOME/dunst/dunstrc</filename>.";
|
||||
example = literalExample ''
|
||||
{
|
||||
global = {
|
||||
|
@ -165,7 +181,7 @@ in {
|
|||
Service = {
|
||||
Type = "dbus";
|
||||
BusName = "org.freedesktop.Notifications";
|
||||
ExecStart = "${cfg.package}/bin/dunst";
|
||||
ExecStart = "${cfg.package}/bin/dunst -config ${cfg.configFile}";
|
||||
Environment = optionalString (cfg.waylandDisplay != "")
|
||||
"WAYLAND_DISPLAY=${cfg.waylandDisplay}";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue