diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix index 60a55c657c0..d8201a3569f 100644 --- a/pkgs/top-level/impure.nix +++ b/pkgs/top-level/impure.nix @@ -29,7 +29,9 @@ dirCheck = dir: dir != "" && pathExists (dir + "/."); overlays = dir: let content = readDir dir; in - map (n: import "${dir}/${n}") (sort lessThan (attrNames content)); + map (n: import "${dir}/${n}") + (builtins.filter (n: builtins.match ".*\.nix" n != null) + (sort lessThan (attrNames content))); in if dirEnv != "" then if dirCheck dirEnv then overlays dirEnv