From 8167af657c0aa58fbe1fabfe7cce0520380c1bb3 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Sun, 4 May 2025 07:17:09 -0700 Subject: [PATCH] mako: fix criterias typo (#6968) --- modules/services/mako.nix | 27 +++++++++---------- .../modules/services/mako/example-config.nix | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/modules/services/mako.nix b/modules/services/mako.nix index 88d74aba..6f6ff0f6 100644 --- a/modules/services/mako.nix +++ b/modules/services/mako.nix @@ -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: . ''; }; - 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; }; }; }; diff --git a/tests/modules/services/mako/example-config.nix b/tests/modules/services/mako/example-config.nix index 137a3b7b..8bf616f4 100644 --- a/tests/modules/services/mako/example-config.nix +++ b/tests/modules/services/mako/example-config.nix @@ -18,7 +18,7 @@ markup = "true"; }; - criterias = { + criteria = { "actionable=true" = { anchor = "top-left"; };