diff options
Diffstat (limited to 'kartei')
-rw-r--r-- | kartei/default.nix | 31 | ||||
-rw-r--r-- | kartei/template/default.nix | 20 |
2 files changed, 37 insertions, 14 deletions
diff --git a/kartei/default.nix b/kartei/default.nix index 1b11f0fd5..6024e2351 100644 --- a/kartei/default.nix +++ b/kartei/default.nix @@ -1,15 +1,18 @@ -{ config, lib, ... }: { - config = lib.mkMerge (map (path: { krebs = import path { inherit config; }; }) [ - ./dbalan - ./jeschli - ./kmein - ./krebs - ./lass - ./makefu - ./mic92 - ./others - ./palo - ./rtunreal - ./tv - ]); +{ config, lib, ... }: let + removeTemplate = + # TODO don't remove during CI + lib.flip builtins.removeAttrs ["template"]; +in { + config = + lib.mkMerge + (lib.mapAttrsToList + (name: _type: let + path = ./. + "/${name}"; + in { + krebs = import path { inherit config; }; + }) + (removeTemplate + (lib.filterAttrs + (_name: type: type == "directory") + (builtins.readDir ./.)))); } diff --git a/kartei/template/default.nix b/kartei/template/default.nix new file mode 100644 index 000000000..2acf78d38 --- /dev/null +++ b/kartei/template/default.nix @@ -0,0 +1,20 @@ +{ config, ... }: let + lib = import ../../lib; +in { + users.DUMMYUSER = { + mail = "DUMMYUSER@example.ork"; + }; + hosts.DUMMYHOST = { + owner = config.krebs.users.DUMMYUSER; + nets.retiolum = { + aliases = [ "DUMMYHOST.DUMMYUSER.r" ]; + ip6.addr = (lib.krebs.genipv6 "retiolum" "DUMMYUSER" { hostName = "DUMMYHOST"; }).address; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + DUMMYTINCPUBKEYRSA + -----END RSA PUBLIC KEY----- + ''; + tinc.pubkey_ed25519 = "DUMMYTINCPUBKEYED25519"; + }; + }; +} |