Skip default.nix in loadNixDir

This will allow a default.nix to use loadNixDir to load its directory.
This commit is contained in:
Archit Gupta 2023-04-15 02:20:26 -07:00
parent 426480067c
commit ec3ce2b4aa

View File

@ -281,12 +281,13 @@ let
loadNixDir = path: genAttrs
(pipe (readDir path) [
attrNames
(filter (s: s != "default.nix"))
(filter (hasSuffix ".nix"))
(map (removeSuffix ".nix"))
(map (removePrefix "+"))
])
(p: import (path +
(if pathExists (path + "/${p}.nix") then "/${p}.nix" else "/+${p}.nix")));
(p: import (path + (if pathExists
(path + "/+${p}.nix") then "/+${p}.nix" else "/${p}.nix")));
systems = rec {
linuxDefault = [