From 1e650af2e19d4ef95e8b1bc356080644891734c9 Mon Sep 17 00:00:00 2001 From: eljamm Date: Mon, 29 Dec 2025 19:15:45 +0100 Subject: [PATCH] nixos/yazi: refactor settings Simply generate the settings submodule's attrset as opposed to mapping and then converting a list to an attrset. --- nixos/modules/programs/yazi.nix | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/nixos/modules/programs/yazi.nix b/nixos/modules/programs/yazi.nix index b6c7e3133bd7..b109374a5a34 100644 --- a/nixos/modules/programs/yazi.nix +++ b/nixos/modules/programs/yazi.nix @@ -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 for documentation. - ''; - } - ) - ) files - ) + See for documentation. + ''; + } ); }; default = { };