diff --git a/default.nix b/default.nix index 64e8a79..48ed585 100644 --- a/default.nix +++ b/default.nix @@ -368,7 +368,8 @@ let root' = let appliedRoot = applyNonSysArgs root; - nixDir = appliedRoot.nixDir or (src + /nix); + nixDir = appliedRoot.nixDir or + (if pathExists (src + /nix) then src + /nix else src); fullRoot = (autoImportAttrs nixDir rootAttrs attrAliases) // appliedRoot; in diff --git a/flake.nix b/flake.nix index d58dcef..75a07a3 100644 --- a/flake.nix +++ b/flake.nix @@ -8,8 +8,5 @@ let flakelite = import ./. inputs; in - flakelite ./. { - nixDir = ./.; - outputs = _: flakelite; - }; + flakelite ./. { outputs = _: flakelite; }; }