2025-05-19 21:51:12 +02:00
|
|
|
# /nix/store/<hash>/etc/ssh/ssh_config & /nix/store/<hash>/etc/ssh/authorized_keys
|
|
|
|
{
|
2025-10-14 20:03:28 +02:00
|
|
|
lib,
|
2025-05-19 21:51:12 +02:00
|
|
|
systemConfig,
|
|
|
|
systems,
|
|
|
|
...
|
|
|
|
}:
|
2025-05-19 21:42:29 +02:00
|
|
|
{
|
2025-10-14 20:03:28 +02:00
|
|
|
programs.ssh.knownHosts = builtins.mapAttrs (hostName: system: {
|
|
|
|
publicKey = system.ssh.publicKey;
|
2025-10-18 13:49:54 +02:00
|
|
|
}) systems;
|
2025-05-19 21:42:29 +02:00
|
|
|
users.users.${systemConfig.username}.openssh.authorizedKeys.keys = (
|
2025-10-18 13:49:54 +02:00
|
|
|
lib.mapAttrsToList (_hostName: system: system.ssh.publicKey) systems
|
2025-05-19 21:42:29 +02:00
|
|
|
);
|
2025-05-15 21:14:05 +02:00
|
|
|
}
|