1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

dunst: make icon_path extensible (#2097)

This commit is contained in:
Naïm Favier 2021-06-17 03:06:16 +02:00 committed by GitHub
parent a01fe9f81e
commit 3aa479d551
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,15 @@ in {
};
settings = mkOption {
type = with types; attrsOf (attrsOf eitherStrBoolIntList);
type = types.submodule {
freeformType = with types; attrsOf (attrsOf eitherStrBoolIntList);
options = {
global.icon_path = mkOption {
type = types.separatedString ":";
description = "Paths where dunst will look for icons.";
};
};
};
default = { };
description = "Configuration written to ~/.config/dunst/dunstrc";
example = literalExample ''
@ -138,11 +146,14 @@ in {
"status"
"stock"
];
in concatStringsSep ":" (concatMap (theme:
concatMap (basePath:
map (category:
"${basePath}/share/icons/${theme.name}/${theme.size}/${category}")
categories) basePaths) themes);
mkPath = { basePath, theme, category }:
"${basePath}/share/icons/${theme.name}/${theme.size}/${category}";
in concatMapStringsSep ":" mkPath (cartesianProductOfSets {
basePath = basePaths;
theme = themes;
category = categories;
});
systemd.user.services.dunst = {
Unit = {