1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-15 13:31:07 +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
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" = {

View file

@ -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" = {