stockholm: check if default.nix exists before importing
This commit is contained in:
parent
fa48986f3f
commit
b0094ce0e4
@ -32,7 +32,7 @@ let stockholm = {
|
|||||||
upath = lib.nspath current-user-name;
|
upath = lib.nspath current-user-name;
|
||||||
|
|
||||||
base-module = { config, ... }: {
|
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 "2configs") [ upath ])
|
||||||
(map (f: f "3modules") [ kpath upath ])
|
(map (f: f "3modules") [ kpath upath ])
|
||||||
]);
|
]);
|
||||||
|
@ -14,6 +14,8 @@ rec {
|
|||||||
|
|
||||||
types = import ./types.nix { inherit lib; };
|
types = import ./types.nix { inherit lib; };
|
||||||
|
|
||||||
|
dir.has-default-nix = path: pathExists (path + "/default.nix");
|
||||||
|
|
||||||
dns = import ./dns.nix { inherit lib; };
|
dns = import ./dns.nix { inherit lib; };
|
||||||
listset = import ./listset.nix { inherit lib; };
|
listset = import ./listset.nix { inherit lib; };
|
||||||
shell = import ./shell.nix { inherit lib; };
|
shell = import ./shell.nix { inherit lib; };
|
||||||
|
Loading…
Reference in New Issue
Block a user