From f42dcdd49a7921a7f433512e83d5f93696632412 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Fri, 13 Feb 2026 19:30:56 +1000 Subject: [PATCH] resort findImport --- nt/precursor/bootstrap/nix.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nt/precursor/bootstrap/nix.nix b/nt/precursor/bootstrap/nix.nix index e8e9319..6caba88 100644 --- a/nt/precursor/bootstrap/nix.nix +++ b/nt/precursor/bootstrap/nix.nix @@ -4,10 +4,13 @@ pathExists ; in { - findImport = path: - if pathExists path - then path - else if pathExists (path + "default.nix") - then path + "/default.nix" - else path + ".nix"; + findImport = path: let + pathA = path + "/default.nix"; + pathB = path + ".nix"; + in + if pathExists pathA + then pathA + else if pathExists pathB + then pathB + else path; }