1
Fork 0
nixos-system-config/lib/fs.nix

17 lines
358 B
Nix
Raw Normal View History

{ lib }:
{
getDirsInDir =
path: let
dirs = builtins.readDir path;
in
2025-01-23 14:46:22 +01:00
builtins.filter (type: dirs.${type} == "directory") (builtins.attrNames dirs);
2025-01-10 23:38:56 +01:00
2025-01-11 02:00:28 +01:00
getModuleImports =
path: let
files = builtins.attrNames (builtins.removeAttrs (builtins.readDir path) ["default.nix"]);
in
map (file: "${path}/${file}") files;
}