Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions modules/services/dunst.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -80,7 +95,8 @@ in {
settings = mkOption {
type = with types; attrsOf (attrsOf eitherStrBoolIntList);
default = { };
description = "Configuration written to ~/.config/dunst/dunstrc";
description =
"Configuration written to <filename>$XDG_CONFIG_HOME/dunst/dunstrc</filename>.";
example = literalExample ''
{
global = {
Expand Down Expand Up @@ -154,7 +170,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}";
};
Expand Down