meli: move freeformat settings to example (#7259)

these hardcoded freeformat settings dont add anything over the default,
worse they generate empty sections which can then clash with user included config (my usecase).
It's best to move those to example.
This commit is contained in:
Matthieu Coudron
2025-06-13 15:25:19 +02:00
committed by GitHub
parent f111393987
commit 79dfd9aa29
2 changed files with 24 additions and 61 deletions

View File

@@ -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";
};