Added master keys
This commit is contained in:
+1
-1
@@ -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
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user