default out: use nspath in namespace loader

This commit is contained in:
tv 2015-10-17 07:25:10 +02:00
parent 4e4e169646
commit aa094e2b81

View File

@ -27,9 +27,9 @@ let
{ inherit (eval {}) config options pkgs; } // { inherit (eval {}) config options pkgs; } //
lib.mapAttrs lib.mapAttrs
(name: _: (name: _:
if builtins.pathExists (./. + "/${name}/default.nix") if builtins.pathExists (nspath name "default.nix")
then import (./. + "/${name}") then import (nspath name "default.nix")
else import-1systems (./. + "/${name}/1systems")) else import-1systems (nspath name "1systems"))
(lib.filterAttrs (lib.filterAttrs
(n: t: !lib.hasPrefix "." n && t == "directory") (n: t: !lib.hasPrefix "." n && t == "directory")
(builtins.readDir ./.)); (builtins.readDir ./.));