From ec3ce2b4aa4c39337e8efea03202945575f1ad4f Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Sat, 15 Apr 2023 02:20:26 -0700 Subject: [PATCH] Skip default.nix in loadNixDir This will allow a default.nix to use loadNixDir to load its directory. --- default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 5562669..1a6ad07 100644 --- a/default.nix +++ b/default.nix @@ -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 = [