mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-10-05 19:28:26 +02:00
12 lines
308 B
Nix
12 lines
308 B
Nix
{lib}: {
|
|
importAll = dir: let
|
|
entries = builtins.readDir dir;
|
|
in
|
|
lib.pipe entries [
|
|
(lib.filterAttrs (name: type: type == "directory"))
|
|
builtins.attrNames
|
|
(builtins.filter (name: builtins.pathExists (dir + "/${name}/default.nix")))
|
|
(map (name: dir + "/${name}"))
|
|
];
|
|
}
|