diff --git a/modules/programs/meli.nix b/modules/programs/meli.nix index 3b629cc6e..ab4791b9a 100644 --- a/modules/programs/meli.nix +++ b/modules/programs/meli.nix @@ -84,65 +84,36 @@ in settings = mkOption { type = types.submodule { - freeformType = (pkgs.formats.toml { }).type; - options = { - shortcuts = mkOption { - type = types.submodule { - options = { - general = mkOption { - type = types.attrsOf types.str; - default = { }; - description = "general shortcut configuration"; - example = { - scroll_up = "e"; - scroll_down = "n"; - next_page = "C-d"; - }; - }; - composing = mkOption { - type = types.attrsOf types.str; - default = { }; - description = "composing shortcut configuration"; - example = { - edit = "m"; - scroll_up = "e"; - scroll_down = "n"; - }; - }; - contact-list = mkOption { - type = types.attrsOf types.str; - default = { }; - description = "contact-list shortcut configuration"; - example = { + freeformType = tomlFormat.type; + }; + example = lib.literalExample '' + { + shortcuts = { + contact-list = { create_contact = "c"; edit_contact = "m"; }; - }; - listing = mkOption { - type = types.attrsOf types.str; - default = { }; - description = "general shortcut configuration"; - example = { - new_mail = "t"; - set_seen = "s"; - }; - }; - pager = mkOption { - type = types.attrsOf types.str; - default = { }; - description = "general shortcut configuration"; - example = { + general = { + edit = "m"; + scroll_up = "e"; + scroll_down = "n"; + }; + composing = { + edit = "m"; + scroll_up = "e"; + scroll_down = "n"; + }; + listing = { + new_mail = "t"; + set_seen = "s"; + }; + pager = { scroll_up = "e"; scroll_down = "n"; - }; - }; - }; - }; - default = { }; - description = "Shortcut Settings"; - }; }; - }; + + } + }''; default = { }; description = "Meli Configuration"; }; diff --git a/tests/modules/programs/meli/expected.toml b/tests/modules/programs/meli/expected.toml index e6a55a851..085000b87 100644 --- a/tests/modules/programs/meli/expected.toml +++ b/tests/modules/programs/meli/expected.toml @@ -27,14 +27,6 @@ PRDR = true danger_accept_invalid_certs = false type = "tls" -[shortcuts.composing] - -[shortcuts.contact-list] - [shortcuts.general] scroll_down = "j" scroll_up = "k" - -[shortcuts.listing] - -[shortcuts.pager]