diff --git a/modules/services/mako.nix b/modules/services/mako.nix index 6f6ff0f6f..afb55b37f 100644 --- a/modules/services/mako.nix +++ b/modules/services/mako.nix @@ -6,7 +6,6 @@ }: let inherit (lib) - types mkIf mkEnableOption mkPackageOption @@ -16,8 +15,8 @@ let cfg = config.services.mako; generateConfig = lib.generators.toINIWithGlobalSection { }; - settingsType = with types; attrsOf str; - criteriaType = types.attrsOf settingsType; + iniType = (pkgs.formats.ini { }).type; + iniAtomType = (pkgs.formats.ini { }).lib.types.atom; in { meta.maintainers = [ lib.maintainers.onny ]; @@ -76,7 +75,7 @@ in enable = mkEnableOption "mako"; package = mkPackageOption pkgs "mako" { }; settings = mkOption { - type = settingsType; + type = lib.types.attrsOf iniAtomType; default = { }; example = '' { @@ -102,7 +101,7 @@ in ''; }; criteria = mkOption { - type = criteriaType; + type = iniType; default = { }; example = { "actionable=true" = { diff --git a/tests/modules/services/mako/example-config.nix b/tests/modules/services/mako/example-config.nix index 8bf616f41..f9397b233 100644 --- a/tests/modules/services/mako/example-config.nix +++ b/tests/modules/services/mako/example-config.nix @@ -2,20 +2,20 @@ services.mako = { enable = true; settings = { - actions = "true"; + actions = true; anchor = "top-right"; backgroundColor = "#000000"; borderColor = "#FFFFFF"; - borderRadius = "0"; - defaultTimeout = "0"; + borderRadius = 0; + defaultTimeout = 0; font = "monospace 10"; - height = "100"; - width = "300"; - icons = "true"; - ignoreTimeout = "false"; + height = 100; + width = 300; + icons = true; + ignoreTimeout = false; layer = "top"; - margin = "10"; - markup = "true"; + margin = 10; + markup = true; }; criteria = { @@ -24,7 +24,7 @@ }; "app-name=Google\\ Chrome" = { - max-visible = "5"; + max-visible = 5; }; "field1=value field2=value" = {