2023-04-14 14:12:45 +03:00
|
|
|
{
|
|
|
|
lib,
|
2024-08-24 21:14:47 +03:00
|
|
|
config,
|
2023-04-14 14:12:45 +03:00
|
|
|
myData,
|
|
|
|
...
|
2024-07-29 15:39:54 +03:00
|
|
|
}:
|
|
|
|
{
|
2023-04-14 14:12:45 +03:00
|
|
|
config = {
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
PermitRootLogin = "no";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
programs.mosh.enable = true;
|
2024-08-24 21:14:47 +03:00
|
|
|
programs.ssh = {
|
|
|
|
knownHosts =
|
|
|
|
let
|
|
|
|
sshAttrs = lib.genAttrs [
|
|
|
|
"extraHostNames"
|
|
|
|
"publicKey"
|
|
|
|
] (_: null);
|
|
|
|
in
|
|
|
|
lib.mapAttrs (_name: builtins.intersectAttrs sshAttrs) myData.hosts;
|
|
|
|
};
|
2023-04-14 14:12:45 +03:00
|
|
|
};
|
|
|
|
}
|