fix(home-manager/dunst): avoid IFD (#302)
This commit is contained in:
parent
66f4ea1700
commit
9fdb8aaf65
1 changed files with 16 additions and 3 deletions
|
@ -5,9 +5,22 @@ let
|
||||||
enable = cfg.enable && config.services.dunst.enable;
|
enable = cfg.enable && config.services.dunst.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt { name = "dunst"; };
|
options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt { name = "dunst"; } // {
|
||||||
|
prefix = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "00";
|
||||||
|
description = "Prefix to use for the dunst drop-in file";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config.services.dunst = lib.mkIf enable {
|
# Dunst currently has no "include" functionality, but has "drop-ins"
|
||||||
settings = lib.ctp.fromINI (sources.dunst + "/themes/${cfg.flavor}.conf");
|
# Unfortunately, this may cause inconvenience as it overrides ~/.config/dunst/dunstrc
|
||||||
|
# but it can be overridden by another drop-in.
|
||||||
|
config.xdg.configFile = lib.mkIf enable {
|
||||||
|
# Using a prefix like this is necessary because drop-ins' precedence depends on lexical order
|
||||||
|
# such that later drop-ins override earlier ones
|
||||||
|
# This way, users have better control over precedence
|
||||||
|
"dunst/dunstrc.d/${cfg.prefix}-catppuccin.conf".source =
|
||||||
|
sources.dunst + "/themes/${cfg.flavor}.conf";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue