kartei: add template
This commit is contained in:
parent
5fa371dd93
commit
b065ee81dc
@ -1,4 +1,8 @@
|
||||
{ config, lib, ... }: {
|
||||
{ config, lib, ... }: let
|
||||
removeTemplate =
|
||||
# TODO don't remove during CI
|
||||
lib.flip builtins.removeAttrs ["template"];
|
||||
in {
|
||||
config =
|
||||
lib.mkMerge
|
||||
(lib.mapAttrsToList
|
||||
@ -7,7 +11,8 @@
|
||||
in {
|
||||
krebs = import path { inherit config; };
|
||||
})
|
||||
(lib.filterAttrs
|
||||
(_name: type: type == "directory")
|
||||
(builtins.readDir ./.)));
|
||||
(removeTemplate
|
||||
(lib.filterAttrs
|
||||
(_name: type: type == "directory")
|
||||
(builtins.readDir ./.))));
|
||||
}
|
||||
|
20
kartei/template/default.nix
Normal file
20
kartei/template/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user