File contains multi sshfp, not one.
This commit is contained in:
parent
674c91354b
commit
46469b739f
@ -27,6 +27,8 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
read-lines = filename: splitString "\n" (fileContents filename);
|
||||
|
||||
host-cfg = config.fudo.hosts.${hostname};
|
||||
|
||||
in {
|
||||
@ -42,12 +44,12 @@ in {
|
||||
host-keypairs);
|
||||
|
||||
hosts = mapAttrs (hostname: keypairs: {
|
||||
ssh-pubkeys = map (keypair: keypair.public-key) keypairs;
|
||||
ssh-pubkeys = concatMap (keypair: keypair.public-key) keypairs;
|
||||
ssh-fingerprints = map (keypair:
|
||||
let
|
||||
fingerprint-derivation = dns-sshfp-records hostname keypair;
|
||||
filename = sshfp-filename hostname keypair;
|
||||
in builtins.readFile "${fingerprint-derivation}/${filename}") keypairs;
|
||||
in read-lines "${fingerprint-derivation}/${filename}") keypairs;
|
||||
}) config.fudo.secrets.files.host-ssh-keypairs;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user