diff --git a/lib/default.nix b/lib/default.nix index 7c3b0370e..d65c891a3 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -95,9 +95,12 @@ let path = dirPath + "/${relPath}"; in nameValuePair (toPackageName name) (f path)) - (filter - (name: name != "default.nix" && !hasPrefix "." name) - (attrNames (readDir dirPath)))); + (attrNames + (filterAttrs + (name: type: + (type == "regular" && hasSuffix ".nix" name && name != "default.nix") || + (type == "directory" && !hasPrefix "." name)) + (readDir dirPath)))); # https://tools.ietf.org/html/rfc5952 normalize-ip6-addr =