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:
parent
68ee758bb9
commit
a579c05f5d
1 changed files with 1 additions and 8 deletions
|
@ -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)))
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue