22
0
mirror of https://github.com/SuperSandro2000/nixos-modules.git synced 2024-05-28 20:10:47 +02:00
This commit is contained in:
Sandro - 2022-12-22 22:43:26 +01:00
parent cd89d3b937
commit b18db1e3b4
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -6,7 +6,7 @@
outputs = { lib, ... }:
let
ls = dir: builtins.attrNames (builtins.readDir (./. + "/${dir}"));
importToAttr = dir: inputAttr: lib.listToAttrs (map (file: { name = lib.removeSuffix ".nix" file; value = import (./. + "/${dir}/${file}.nix") inputAttr; }) (ls dir));
importToAttr = dir: inputAttr: builtins.listToAttrs (map (file: { name = lib.removeSuffix ".nix" file; value = import (./. + "/${dir}/${file}.nix") inputAttr; }) (ls dir));
in
{
lib = inputAttr: importToAttr "lib" inputAttr;