mako: fix criterias typo (#6968)

This commit is contained in:
awwpotato 2025-05-04 07:17:09 -07:00 committed by GitHub
parent 3a185176e4
commit 8167af657c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 15 deletions

View file

@ -17,7 +17,7 @@ let
generateConfig = lib.generators.toINIWithGlobalSection { };
settingsType = with types; attrsOf str;
criteriasType = types.attrsOf settingsType;
criteriaType = types.attrsOf settingsType;
in
{
meta.maintainers = [ lib.maintainers.onny ];
@ -29,14 +29,6 @@ in
"mako"
];
removedOptions = [
(lib.mkRemovedOptionModule [
"services"
"mako"
"extraConfig"
] "Use services.mako.settings instead.")
];
renamedOptions = [
"maxVisible"
"maxHistory"
@ -70,7 +62,14 @@ in
oldPrefix: newPrefix:
map (option: lib.mkRenamedOptionModule (oldPrefix ++ [ option ]) (newPrefix ++ [ option ]));
in
removedOptions
[
(lib.mkRemovedOptionModule [
"services"
"mako"
"extraConfig"
] "Use services.mako.settings instead.")
(lib.mkRenamedOptionModule [ "services" "mako" "criterias" ] [ "services" "mako" "criteria" ])
]
++ mkSettingsRenamedOptionModules basePath (basePath ++ [ "settings" ]) renamedOptions;
options.services.mako = {
@ -102,8 +101,8 @@ in
here: <https://github.com/emersion/mako/blob/master/doc/mako.5.scd>.
'';
};
criterias = mkOption {
type = criteriasType;
criteria = mkOption {
type = criteriaType;
default = { };
example = {
"actionable=true" = {
@ -132,11 +131,11 @@ in
home.packages = [ cfg.package ];
xdg.configFile."mako/config" = mkIf (cfg.settings != { } || cfg.criterias != { }) {
xdg.configFile."mako/config" = mkIf (cfg.settings != { } || cfg.criteria != { }) {
onChange = "${cfg.package}/bin/makoctl reload || true";
text = generateConfig {
globalSection = cfg.settings;
sections = cfg.criterias;
sections = cfg.criteria;
};
};
};

View file

@ -18,7 +18,7 @@
markup = "true";
};
criterias = {
criteria = {
"actionable=true" = {
anchor = "top-left";
};