2023-03-03 23:33:37 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
programs.bash.initExtra = ''
|
|
|
|
# ssh autocomplete
|
|
|
|
if test -f ~/.ssh/config; then
|
2023-03-13 01:15:27 +01:00
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" ssh
|
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" rssh
|
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" vpn
|
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" lvpn
|
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" dvpn
|
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" scp
|
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" remote-init
|
|
|
|
complete -W "$(cat ~/.ssh/config | grep "^Host " | cut -d" " -f2- | grep -v "\*")" remote-add
|
2023-03-03 23:33:37 +01:00
|
|
|
fi
|
|
|
|
'';
|
2023-03-11 03:39:21 +01:00
|
|
|
|
|
|
|
programs.ssh.enable = true;
|
|
|
|
programs.ssh.controlMaster = "yes";
|
|
|
|
programs.ssh.compression = true;
|
|
|
|
programs.ssh.matchBlocks = {
|
|
|
|
"*".serverAliveInterval = 10;
|
|
|
|
"*".serverAliveCountMax = 3;
|
|
|
|
"github.com".forwardX11 = false;
|
2023-03-13 01:15:27 +01:00
|
|
|
"gitea.*".forwardX11 = false;
|
|
|
|
"gogs.*".forwardX11 = false;
|
|
|
|
"git.*".forwardX11 = false;
|
|
|
|
"*.pbsds.net".forwardX11 = true;
|
2023-03-19 04:23:38 +01:00
|
|
|
"*.pbsds.net".forwardX11Trusted = true;
|
2023-03-11 03:39:21 +01:00
|
|
|
"*.ntnu.no".user = "pederbs";
|
|
|
|
"*.pvv.org".user = "pederbs";
|
2023-11-18 22:21:12 +01:00
|
|
|
"*.hpc.ntnu.no".proxyJump = "microbel.pvv.ntnu.no";
|
|
|
|
"*.idi.ntnu.no".proxyJump = "microbel.pvv.ntnu.no";
|
2023-03-11 03:39:21 +01:00
|
|
|
|
|
|
|
# me
|
2023-11-18 22:21:12 +01:00
|
|
|
"garp.pbsds.net".proxyJump = "microbel.pvv.ntnu.no";
|
2023-11-21 00:39:09 +01:00
|
|
|
"eple.pbsds.net".proxyJump = "microbel.pvv.ntnu.no";
|
2023-11-18 22:21:12 +01:00
|
|
|
"bolle.pbsds.net".proxyJump = "microbel.pvv.ntnu.no";
|
2024-01-31 22:17:55 +01:00
|
|
|
"pederbs.idi.ntnu.no" = {};
|
|
|
|
"brumlebasse.pbsds.net".port = 2222;
|
2023-03-11 03:39:21 +01:00
|
|
|
"knut.pbsds.net".port = 23;
|
|
|
|
"nord.pbsds.net".port = 24;
|
2023-06-19 11:46:09 +02:00
|
|
|
"sopp.pbsds.net".port = 26;
|
2023-03-19 04:23:38 +01:00
|
|
|
"noximilien.pbsds.net" = {};
|
2023-11-18 22:21:12 +01:00
|
|
|
"rocm.pbsds.net".proxyJump = "microbel.pvv.ntnu.no";
|
2023-03-11 03:39:21 +01:00
|
|
|
|
|
|
|
# ntnu
|
|
|
|
"stud.ntnu.no".hostname = "login.stud.ntnu.no";
|
|
|
|
"login.stud.ntnu.no" = {};
|
|
|
|
"clab15.idi.ntnu.no" = {};
|
|
|
|
"idun-login1.hpc.ntnu.no" = {};
|
|
|
|
"snotra-login1.idi.ntnu.no" = {};
|
|
|
|
"oppdal.idi.ntnu.no" = {};
|
|
|
|
"selbu.idi.ntnu.no" = {};
|
|
|
|
"malvik.idi.ntnu.no" = {};
|
|
|
|
"heid.idi.ntnu.no" = {};
|
|
|
|
|
|
|
|
# NVG
|
|
|
|
"nvg.ntnu.no".hostname = "login.stud.ntnu.no";
|
|
|
|
|
|
|
|
# pvv
|
|
|
|
"alphys.pvv.ntnu.no".user = "root";
|
|
|
|
"balduzius.pvv.ntnu.no".user = "root";
|
|
|
|
"brzeczyszczykiewicz.pvv.ntnu.no" = {};
|
|
|
|
"dash8.pvv.ntnu.no" = {};
|
|
|
|
"demiurgen.pvv.ntnu.no" = {};
|
|
|
|
"dvask-mgmt.pvv.ntnu.no".user = "root";
|
|
|
|
"eirin.pvv.ntnu.no" = {};
|
|
|
|
"essendrop.pvv.ntnu.no" = {};
|
|
|
|
"fenris.pvv.ntnu.no".user = "root";
|
|
|
|
"git.pvv.ntnu.no" = {};
|
|
|
|
"hasub.pvv.ntnu.no" = {};
|
|
|
|
"hildring.pvv.ntnu.no" = {};
|
|
|
|
"innovation.pvv.ntnu.no".user = "root";
|
|
|
|
"isvegg.pvv.ntnu.no" = {};
|
|
|
|
"knakelibrak.pvv.ntnu.no" = {};
|
|
|
|
"lommel.pvv.ntnu.no" = {};
|
|
|
|
"microbel.pvv.ntnu.no" = {};
|
|
|
|
"monty.pvv.ntnu.no" = {};
|
|
|
|
"nsa.pvv.ntnu.no" = {};
|
|
|
|
"principal.pvv.ntnu.no".user = "root";
|
|
|
|
"skrotnisse.pvv.ntnu.no" = {};
|
|
|
|
"skrott.pvv.ntnu.no".user = "root";
|
|
|
|
"sleipner.pvv.ntnu.no" = {};
|
|
|
|
"sleipner.pvv.ntnu.no" = {};
|
|
|
|
"spikkjeposche.pvv.ntnu.no" = {};
|
|
|
|
"tallulah.pvv.ntnu.no" = {};
|
|
|
|
"tim.pvv.ntnu.no" = {};
|
|
|
|
"tom.pvv.ntnu.no" = {};
|
|
|
|
"toriel.pvv.ntnu.no".user = "root";
|
|
|
|
|
|
|
|
# fyrkat
|
2024-02-25 15:45:35 +01:00
|
|
|
#"fyrkat.no".hostname = "fridge.fyrkat.no";
|
|
|
|
#"*.fyrkat.no".proxyJump = "microbel.pvv.ntnu.no";
|
2023-03-11 03:39:21 +01:00
|
|
|
"fridge.fyrkat.no" = {};
|
|
|
|
"fil.fyrkat.no" = {};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2023-03-03 23:33:37 +01:00
|
|
|
}
|