infrastructure/util/include.nix

10 lines
292 B
Nix
Raw Normal View History

2023-04-12 12:47:22 +00:00
{ lib }: rec {
includeDir = dirName:
let
toFilePath = name: value: dirName + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
in
lib.mapAttrsToList toFilePath
(lib.filterAttrs filterCaches (builtins.readDir dirName));
}