16 lines
358 B
Nix
16 lines
358 B
Nix
{ lib }:
|
|
|
|
{
|
|
getDirsInDir =
|
|
path: let
|
|
dirs = builtins.readDir path;
|
|
in
|
|
builtins.filter (name: dirs.${name} == "directory") (builtins.attrNames dirs);
|
|
|
|
getModuleImports =
|
|
path: let
|
|
files = builtins.attrNames (builtins.removeAttrs (builtins.readDir path) ["default.nix"]);
|
|
in
|
|
map (file: "${path}/${file}") files;
|
|
}
|
|
|