2024-11-07 07:51:24 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
systemConfig,
|
|
|
|
lib,
|
|
|
|
...
|
2024-11-09 14:02:26 +00:00
|
|
|
}:
|
|
|
|
let
|
2024-11-07 07:51:24 +00:00
|
|
|
identityFile =
|
2024-11-09 14:02:26 +00:00
|
|
|
if config.home.username == "root" then
|
|
|
|
systemConfig.sops.secrets.".ssh/builder_id_ed25519".path
|
|
|
|
else
|
|
|
|
config.sops.secrets.".ssh/builder_id_ed25519".path;
|
|
|
|
in
|
|
|
|
{
|
2024-11-06 09:09:17 +00:00
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
matchBlocks = {
|
|
|
|
"build-nas" = {
|
|
|
|
hostname = "nas.int.chir.rs";
|
|
|
|
identitiesOnly = true;
|
2024-11-07 07:51:24 +00:00
|
|
|
inherit identityFile;
|
2024-11-06 09:09:17 +00:00
|
|
|
port = 22;
|
|
|
|
user = "remote-build";
|
|
|
|
};
|
|
|
|
"build-rainbow-resort" = {
|
|
|
|
hostname = "rainbow-resort.int.chir.rs";
|
|
|
|
identitiesOnly = true;
|
2024-11-07 07:51:24 +00:00
|
|
|
inherit identityFile;
|
2024-11-06 09:09:17 +00:00
|
|
|
port = 22;
|
|
|
|
user = "remote-build";
|
|
|
|
};
|
|
|
|
"build-aarch64" = {
|
|
|
|
hostname = "instance-20221213-1915.int.chir.rs";
|
|
|
|
identitiesOnly = true;
|
2024-11-07 07:51:24 +00:00
|
|
|
inherit identityFile;
|
2024-11-06 09:09:17 +00:00
|
|
|
port = 22;
|
|
|
|
user = "remote-build";
|
|
|
|
};
|
|
|
|
"build-riscv" = {
|
|
|
|
hostname = "not522.tailbab65.ts.net";
|
|
|
|
identitiesOnly = true;
|
2024-11-07 07:51:24 +00:00
|
|
|
inherit identityFile;
|
2024-11-06 09:09:17 +00:00
|
|
|
port = 22;
|
|
|
|
user = "remote-build";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-11-07 07:51:24 +00:00
|
|
|
sops.secrets = lib.mkIf (config.home.username != "root") {
|
|
|
|
".ssh/builder_id_ed25519" = {
|
|
|
|
mode = "600";
|
|
|
|
sopsFile = ./shared-keys.yaml;
|
|
|
|
};
|
2024-11-06 09:09:17 +00:00
|
|
|
};
|
|
|
|
}
|