mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 19:17:45 +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;
|
lib0 = nixpkgs.lib;
|
||||||
keys = import ./keys.nix;
|
keys = import ./keys.nix;
|
||||||
|
|
||||||
collectNixFiles = directory: with lib0; pipe (builtins.readDir directory) [
|
collectNixFiles = directory: with lib0; pipe (filesystem.listFilesRecursive directory) [
|
||||||
(mapAttrsToList (name: type: let
|
|
||||||
path = /${directory}/${name};
|
|
||||||
in if type == "directory" then
|
|
||||||
collectNixFiles path
|
|
||||||
else
|
|
||||||
path))
|
|
||||||
flatten
|
|
||||||
(filter (hasSuffix ".nix"))
|
(filter (hasSuffix ".nix"))
|
||||||
(filter (name: !hasPrefix "_" (builtins.baseNameOf name)))
|
(filter (name: !hasPrefix "_" (builtins.baseNameOf name)))
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue