2023-09-04 21:36:31 +02:00
|
|
|
{ lib, ... }:
|
2023-03-31 18:27:25 +02:00
|
|
|
|
2023-09-04 21:36:31 +02:00
|
|
|
let
|
2024-06-03 09:20:11 +02:00
|
|
|
keys = import ../../../keys.nix;
|
2023-09-04 21:36:31 +02:00
|
|
|
hostsKeys = lib.mapAttrs (name: value: { publicKey = value; }) keys.hosts;
|
|
|
|
in
|
2023-03-31 18:27:25 +02:00
|
|
|
{
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
|
|
# Connect to intranet git hosts via proxy
|
|
|
|
programs.ssh.extraConfig = ''
|
|
|
|
Host bscpm02.bsc.es bscpm03.bsc.es gitlab-internal.bsc.es alya.gitlab.bsc.es
|
|
|
|
User git
|
|
|
|
ProxyCommand nc -X connect -x localhost:23080 %h %p
|
|
|
|
'';
|
|
|
|
|
2023-09-04 21:36:31 +02:00
|
|
|
programs.ssh.knownHosts = hostsKeys // {
|
2023-03-31 18:27:25 +02:00
|
|
|
"gitlab-internal.bsc.es".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF9arsAOSRB06hdy71oTvJHG2Mg8zfebADxpvc37lZo3";
|
|
|
|
"bscpm03.bsc.es".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM2NuSUPsEhqz1j5b4Gqd+MWFnRqyqY57+xMvBUqHYUS";
|
|
|
|
};
|
|
|
|
}
|