about summary refs log tree commit diff
path: root/pkgs/top-level/impure.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/top-level/impure.nix')
-rw-r--r--pkgs/top-level/impure.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix
index 242596d28c6b0..4d847e280f4b9 100644
--- a/pkgs/top-level/impure.nix
+++ b/pkgs/top-level/impure.nix
@@ -47,7 +47,12 @@ in
           # it's a directory, so the set of overlays from the directory, ordered lexicographically
           let content = builtins.readDir path; in
           map (n: import (path + ("/" + n)))
-            (builtins.filter (n: builtins.match ".*\\.nix" n != null || builtins.pathExists (path + ("/" + n + "/default.nix")))
+            (builtins.filter
+              (n:
+                (builtins.match ".*\\.nix" n != null &&
+                 # ignore Emacs lock files (.#foo.nix)
+                 builtins.match "\\.#.*" n == null) ||
+                builtins.pathExists (path + ("/" + n + "/default.nix")))
               (builtins.attrNames content))
         else
           # it's a file, so the result is the contents of the file itself