Refactor wrapper module args

This commit is contained in:
SebastianStork 2024-08-15 16:14:48 +02:00
parent 13ea22656c
commit 87784510f1

View file

@ -8,8 +8,11 @@
...
}:
{
_module.args.wrappers = lib.concatMapAttrs (name: _: {
${lib.removeSuffix ".nix" name} = import "${self}/wrappers/${name}" { inherit inputs pkgs lib; };
}) (builtins.readDir "${self}/wrappers");
_module.args.wrappers = lib.mapAttrs' (
name: _:
lib.nameValuePair (lib.removeSuffix ".nix" name) (
import "${self}/wrappers/${name}" { inherit inputs pkgs lib; }
)
) (builtins.readDir "${self}/wrappers");
};
}