Added master keys

This commit is contained in:
2021-09-30 11:30:32 -07:00
parent b690935dea
commit 82325ddaf9
11 changed files with 40 additions and 6 deletions
+1 -1
View File
@@ -286,7 +286,7 @@ in {
build-private-key-file =
if (hasAttr hostname config.fudo.secrets.files.build-keypairs) then
config.fudo.secrets.files.build-keypairs.${hostname}
config.fudo.secrets.files.build-keypairs.${hostname}.private-key
else null;
in {
host-keytab = mkIf (keytab-file != null) {
+6 -4
View File
@@ -27,6 +27,8 @@ let
'';
};
host-cfg = config.fudo.hosts.${hostname};
in {
config = {
fudo = {
@@ -65,15 +67,15 @@ in {
crossProduct = f: list0: list1:
concatMap (el0: map (el1: f el0 el1) list1) list0;
all-hostnames = opts:
[ opts.hostname ] ++
all-hostnames = hostname: opts:
[ hostname ] ++
(crossProduct (host: domain: "${host}.${domain}")
([ opts.hostname ] ++ opts.aliases)
([ hostname ] ++ opts.aliases)
([ opts.domain ] ++ opts.extra-domains));
in mapAttrs (hostname: hostOpts: {
publicKeyFile = builtins.head hostOpts.ssh-pubkeys;
hostNames = all-hostnames host-cfg;
hostNames = all-hostnames hostname host-cfg;
}) keyed-hosts;
};
}