stockholm: check if default.nix exists before importing

This commit is contained in:
tv 2015-11-09 02:58:21 +01:00
parent fa48986f3f
commit b0094ce0e4
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ let stockholm = {
upath = lib.nspath current-user-name;
base-module = { config, ... }: {
imports = builtins.filter builtins.pathExists (lib.concatLists [
imports = builtins.filter lib.dir.has-default-nix (lib.concatLists [
(map (f: f "2configs") [ upath ])
(map (f: f "3modules") [ kpath upath ])
]);

View File

@ -14,6 +14,8 @@ rec {
types = import ./types.nix { inherit lib; };
dir.has-default-nix = path: pathExists (path + "/default.nix");
dns = import ./dns.nix { inherit lib; };
listset = import ./listset.nix { inherit lib; };
shell = import ./shell.nix { inherit lib; };