kartei: add template

This commit is contained in:
tv 2022-11-23 18:16:48 +01:00
parent 5fa371dd93
commit b065ee81dc
2 changed files with 29 additions and 4 deletions

View File

@ -1,4 +1,8 @@
{ config, lib, ... }: { { config, lib, ... }: let
removeTemplate =
# TODO don't remove during CI
lib.flip builtins.removeAttrs ["template"];
in {
config = config =
lib.mkMerge lib.mkMerge
(lib.mapAttrsToList (lib.mapAttrsToList
@ -7,7 +11,8 @@
in { in {
krebs = import path { inherit config; }; krebs = import path { inherit config; };
}) })
(removeTemplate
(lib.filterAttrs (lib.filterAttrs
(_name: type: type == "directory") (_name: type: type == "directory")
(builtins.readDir ./.))); (builtins.readDir ./.))));
} }

View File

@ -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";
};
};
}