1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 11:07:44 +00:00

Use lib.filesystem.readFilesRecursive

This commit is contained in:
RGBCube 2024-05-15 14:13:52 +03:00
parent 68ee758bb9
commit a579c05f5d
No known key found for this signature in database

View file

@ -72,14 +72,7 @@
lib0 = nixpkgs.lib;
keys = import ./keys.nix;
collectNixFiles = directory: with lib0; pipe (builtins.readDir directory) [
(mapAttrsToList (name: type: let
path = /${directory}/${name};
in if type == "directory" then
collectNixFiles path
else
path))
flatten
collectNixFiles = directory: with lib0; pipe (filesystem.listFilesRecursive directory) [
(filter (hasSuffix ".nix"))
(filter (name: !hasPrefix "_" (builtins.baseNameOf name)))
];