add hosts' SSH keys to known_hosts

This commit is contained in:
Katherina Walshe-Grey 2025-02-04 19:51:19 +00:00
parent 4e461f83a8
commit 007130e869

View file

@ -132,5 +132,12 @@ in
++ optionals host.isRouter [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ]; ++ optionals host.isRouter [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ];
}; };
}; };
services.openssh.knownHosts = builtins.mapAttrs
(name: host: {
publicKey = host.hostKey;
hostNames = [ host.ipv4 host.ipv6 ];
})
hosts;
}; };
} }