1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-15 05:21:06 +01:00

mako: use ini atom type (#6977)

Fix backwards compatibility
This commit is contained in:
Austin Horstman 2025-05-04 21:44:38 -05:00 committed by GitHub
parent 1a1793f6d9
commit 5f1f472565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 15 deletions

View file

@ -6,7 +6,6 @@
}: }:
let let
inherit (lib) inherit (lib)
types
mkIf mkIf
mkEnableOption mkEnableOption
mkPackageOption mkPackageOption
@ -16,8 +15,8 @@ let
cfg = config.services.mako; cfg = config.services.mako;
generateConfig = lib.generators.toINIWithGlobalSection { }; generateConfig = lib.generators.toINIWithGlobalSection { };
settingsType = with types; attrsOf str; iniType = (pkgs.formats.ini { }).type;
criteriaType = types.attrsOf settingsType; iniAtomType = (pkgs.formats.ini { }).lib.types.atom;
in in
{ {
meta.maintainers = [ lib.maintainers.onny ]; meta.maintainers = [ lib.maintainers.onny ];
@ -76,7 +75,7 @@ in
enable = mkEnableOption "mako"; enable = mkEnableOption "mako";
package = mkPackageOption pkgs "mako" { }; package = mkPackageOption pkgs "mako" { };
settings = mkOption { settings = mkOption {
type = settingsType; type = lib.types.attrsOf iniAtomType;
default = { }; default = { };
example = '' example = ''
{ {
@ -102,7 +101,7 @@ in
''; '';
}; };
criteria = mkOption { criteria = mkOption {
type = criteriaType; type = iniType;
default = { }; default = { };
example = { example = {
"actionable=true" = { "actionable=true" = {

View file

@ -2,20 +2,20 @@
services.mako = { services.mako = {
enable = true; enable = true;
settings = { settings = {
actions = "true"; actions = true;
anchor = "top-right"; anchor = "top-right";
backgroundColor = "#000000"; backgroundColor = "#000000";
borderColor = "#FFFFFF"; borderColor = "#FFFFFF";
borderRadius = "0"; borderRadius = 0;
defaultTimeout = "0"; defaultTimeout = 0;
font = "monospace 10"; font = "monospace 10";
height = "100"; height = 100;
width = "300"; width = 300;
icons = "true"; icons = true;
ignoreTimeout = "false"; ignoreTimeout = false;
layer = "top"; layer = "top";
margin = "10"; margin = 10;
markup = "true"; markup = true;
}; };
criteria = { criteria = {
@ -24,7 +24,7 @@
}; };
"app-name=Google\\ Chrome" = { "app-name=Google\\ Chrome" = {
max-visible = "5"; max-visible = 5;
}; };
"field1=value field2=value" = { "field1=value field2=value" = {