mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
dunst: use -config
flag when configFile
is set
This commit is contained in:
parent
afc892db74
commit
a6c743980e
1 changed files with 6 additions and 5 deletions
|
@ -65,9 +65,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
configFile = mkOption {
|
configFile = mkOption {
|
||||||
type = with types; either str path;
|
type = with types; nullOr (either str path);
|
||||||
default = "${config.xdg.configHome}/dunst/dunstrc";
|
default = null;
|
||||||
defaultText = "$XDG_CONFIG_HOME/dunst/dunstrc";
|
|
||||||
description = ''
|
description = ''
|
||||||
Path to the configuration file read by dunst.
|
Path to the configuration file read by dunst.
|
||||||
|
|
||||||
|
@ -170,7 +169,7 @@ in {
|
||||||
"stock"
|
"stock"
|
||||||
];
|
];
|
||||||
|
|
||||||
mkPath = { basePath, theme, category }:
|
mkPath = { basePath, theme, category, }:
|
||||||
"${basePath}/share/icons/${theme.name}/${theme.size}/${category}";
|
"${basePath}/share/icons/${theme.name}/${theme.size}/${category}";
|
||||||
in concatMapStringsSep ":" mkPath (cartesianProduct {
|
in concatMapStringsSep ":" mkPath (cartesianProduct {
|
||||||
basePath = basePaths;
|
basePath = basePaths;
|
||||||
|
@ -188,7 +187,9 @@ in {
|
||||||
Service = {
|
Service = {
|
||||||
Type = "dbus";
|
Type = "dbus";
|
||||||
BusName = "org.freedesktop.Notifications";
|
BusName = "org.freedesktop.Notifications";
|
||||||
ExecStart = "${cfg.package}/bin/dunst -config ${cfg.configFile}";
|
ExecStart = escapeShellArgs ([ "${cfg.package}/bin/dunst" ] ++
|
||||||
|
# Using `-config` breaks dunst's drop-ins, so only use it when an alternative path is set
|
||||||
|
optionals (cfg.configFile != null) [ "-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