nixos/yazi: refactor settings

Simply generate the settings submodule's attrset as opposed to mapping
and then converting a list to an attrset.
This commit is contained in:
eljamm
2025-12-29 21:42:07 +01:00
parent b50f322864
commit 1e650af2e1
+10 -16
View File
@@ -26,23 +26,17 @@ in
type =
with lib.types;
submodule {
options = (
lib.listToAttrs (
map (
name:
lib.nameValuePair name (
lib.mkOption {
inherit (settingsFormat) type;
default = { };
description = ''
Configuration included in `${name}.toml`.
options = lib.genAttrs files (
name:
lib.mkOption {
inherit (settingsFormat) type;
default = { };
description = ''
Configuration included in `${name}.toml`.
See <https://yazi-rs.github.io/docs/configuration/${name}/> for documentation.
'';
}
)
) files
)
See <https://yazi-rs.github.io/docs/configuration/${name}/> for documentation.
'';
}
);
};
default = { };