Add ssh config to nix properly

This commit is contained in:
Evie Litherland-Smith 2023-05-04 11:06:31 +01:00
parent d074fdb11e
commit f99a16a65d
2 changed files with 14 additions and 33 deletions

View file

@ -1,32 +0,0 @@
# vim: ft=sshconfig
Host legion xenia xenia.me.uk
User xenia
HostName xenia.me.uk
Port 30
ForwardAgent yes
Host git.ccfe.ac.uk
user git
Host heimdall
HostName heimdall003.jet.uk
Host heimdall???
HostName %h.jet.uk
Host batch
User cxsbatch
HostName heimdall115.jetdata.eu
Host jdc
HostName 10.40.4.103
Host freia
HostName freia022.hpc.l
Host freia???
HostName %h.hpc.l
Host heimdall* jdc* freia* batch
User elitherl

View file

@ -2,11 +2,24 @@
{
programs.ssh = {
enable = true;
includes = [ "config.d/*" ];
forwardAgent = true;
serverAliveInterval = 15;
serverAliveCountMax = 3;
controlMaster = "auto";
controlPersist = "1s";
matchBlocks = {
"legion xenia xenia.me.uk" = {
user = "xenia";
hostname = "xenia.me.uk";
port = 30;
forwardAgent = true;
};
"vanguard" = {
user = "xenia";
hostname = "192.168.1.166";
forwardAgent = true;
};
"git.ccfe.ac.uk".user = "git";
};
};
}