blob: 41bd1573df8dcf6f01055a1ffaa2390a93a828da [file] [log] [blame]
Skyler Greybcb2cb72022-08-21 07:24:35 +01001# Modified from http://chriswarbo.net/projects/nixos/useful_hacks.html
2lib: dir:
3map (name: {
4 inherit name;
5 path = dir + "/${name}";
6}) (lib.attrNames (lib.filterAttrs (name: _: lib.hasSuffix ".nix" name) (builtins.readDir dir)))