2024-06-17 21:36:00 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
gcpHost = {
|
|
|
|
hostname,
|
|
|
|
project,
|
|
|
|
zone,
|
|
|
|
forwardAgent ? false,
|
|
|
|
}: {
|
2024-06-18 17:38:08 +00:00
|
|
|
proxyCommand = "${lib.getExe pkgs.python3} -S ${pkgs.google-cloud-sdk}/google-cloud-sdk/lib/gcloud.py compute start-iap-tunnel ${hostname} %p --listen-on-stdin --project ${project} --zone ${zone}";
|
2024-06-17 21:36:00 +00:00
|
|
|
forwardAgent = forwardAgent;
|
|
|
|
checkHostIP = false;
|
|
|
|
identitiesOnly = true;
|
|
|
|
extraOptions = {
|
|
|
|
StrictHostKeyChecking = "no";
|
|
|
|
ProxyUseFdpass = "no";
|
|
|
|
UserKnownHostsFile = "~/.ssh/google_compute_known_hosts";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2024-03-31 14:11:09 +00:00
|
|
|
programs.ssh = {
|
2024-06-17 21:36:00 +00:00
|
|
|
enable = true;
|
2024-03-31 14:11:09 +00:00
|
|
|
|
|
|
|
compression = true;
|
|
|
|
addKeysToAgent = "ask";
|
2024-06-17 21:36:00 +00:00
|
|
|
|
|
|
|
matchBlocks = {
|
|
|
|
"cesium git.fainsin.bzh" = {
|
|
|
|
hostname = "fainsin.bzh";
|
|
|
|
user = "root";
|
|
|
|
port = 624;
|
|
|
|
};
|
|
|
|
"nicole" = {
|
|
|
|
hostname = "3.tcp.eu.ngrok.io";
|
|
|
|
user = "laurent";
|
|
|
|
port = 25077;
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
|
|
|
"dataverse51" = gcpHost {
|
|
|
|
hostname = "dataverse51";
|
|
|
|
project = "genie-training";
|
2024-07-03 09:11:01 +00:00
|
|
|
zone = "europe-west4-a";
|
2024-06-17 21:36:00 +00:00
|
|
|
forwardAgent = true;
|
|
|
|
};
|
2024-06-29 20:49:52 +00:00
|
|
|
"dataverse51-gpu" = gcpHost {
|
|
|
|
hostname = "dataverse51-gpu";
|
|
|
|
project = "genie-training";
|
|
|
|
zone = "europe-west4-a";
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
2024-06-17 21:36:00 +00:00
|
|
|
"laurent-dev-hdd" = gcpHost {
|
|
|
|
hostname = "laurent-dev-hdd";
|
|
|
|
project = "genie-training";
|
|
|
|
zone = "europe-west1-b";
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
|
|
|
"laurent-dev-l4" = gcpHost {
|
|
|
|
hostname = "laurent-dev-l4";
|
|
|
|
project = "genie-training";
|
|
|
|
zone = "europe-west1-b";
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
|
|
|
"laurent-dev-a100" = gcpHost {
|
|
|
|
hostname = "laurent-dev-a100";
|
|
|
|
project = "genie-training";
|
|
|
|
zone = "europe-west4-a";
|
|
|
|
forwardAgent = true;
|
|
|
|
};
|
|
|
|
};
|
2024-03-31 14:11:09 +00:00
|
|
|
};
|
|
|
|
}
|