{ lib, ... }: let # Every .nix file below a directory. Paths containing "/_" are skipped, # which is how work-in-progress modules stay out of the import tree. listModules = directory: lib.filter ( path: let string = toString path; in lib.hasSuffix ".nix" string && !(lib.hasInfix "/_" string) ) (lib.filesystem.listFilesRecursive directory); in { inherit listModules; }