Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334{ lib }:let inherit (lib) concatLists hasPrefix hasSuffix mapAttrsToList ;
listNix = root: let go = dir: concatLists ( mapAttrsToList ( name: entry: if hasPrefix "_" name then [ ] else if entry == "directory" then go (dir + "/${name}") else if entry == "regular" && hasSuffix ".nix" name then [ (dir + "/${name}") ] else [ ] ) (builtins.readDir dir) ); in if !builtins.pathExists root then throw "importTree: ${toString root} does not exist" else go root;in{ inherit listNix;}