nixos-config/users/rouven/modules/ssh/default.nix

89 lines
2 KiB
Nix
Raw Normal View History

2024-06-22 16:28:09 +02:00
{ pkgs, ... }:
2023-04-06 22:31:45 +02:00
let
2023-11-16 15:53:15 +01:00
git = "~/.ssh/git";
2023-04-06 22:31:45 +02:00
in
2023-01-06 10:37:50 +01:00
{
programs.ssh = {
2023-01-06 10:37:50 +01:00
enable = true;
2024-06-22 16:28:09 +02:00
package = pkgs.openssh_gssapi;
2023-07-30 19:41:51 +02:00
compression = true;
2023-11-20 22:47:07 +01:00
controlMaster = "auto";
controlPersist = "10m";
extraConfig = ''
CanonicalizeHostname yes
CanonicalDomains agdsn.network vpn.rfive.de
2023-11-20 22:47:07 +01:00
PKCS11Provider /run/current-system/sw/lib/libtpm2_pkcs11.so
IdentityFile ~/.ssh/id_ed25519
2024-04-22 15:24:37 +02:00
SetEnv TERM=xterm-256color
2023-11-20 22:47:07 +01:00
VisualHostKey = yes
'';
2023-01-06 10:37:50 +01:00
matchBlocks = {
2024-04-17 16:12:09 +02:00
# Personal
2023-11-20 23:55:55 +01:00
"git@github.com" = {
match = "Host github.com User git";
2023-04-06 22:31:45 +02:00
identityFile = git;
2023-01-06 10:37:50 +01:00
};
2024-04-10 00:34:03 +02:00
"git@git.sr.ht" = {
match = "Host git.sr.ht User git";
identityFile = git;
};
2024-04-17 16:12:09 +02:00
"*.vpn.rfive.de" = {
user = "root";
};
# TU Dresden
"tud" = {
hostname = "login.zih.tu-dresden.de";
user = "rose159e";
};
2024-05-13 12:00:00 +02:00
"mininet" = {
hostname = "internet.netd.cs.tu-dresden.de";
user = "root";
port = 2133;
extraOptions = {
ProxyJump = "tud";
};
};
2024-04-17 16:12:09 +02:00
2023-11-20 22:47:07 +01:00
# iFSR
2023-11-20 23:55:55 +01:00
"quitte" = {
hostname = "quitte.ifsr.de";
2024-04-22 15:24:37 +02:00
user = "rouven.seifert";
2023-11-20 23:55:55 +01:00
};
"tomate" = {
hostname = "tomate.ifsr.de";
2024-04-22 15:24:37 +02:00
user = "rouven.seifert";
extraOptions = {
2024-04-17 16:12:09 +02:00
ProxyJump = "tud";
};
2023-11-20 23:55:55 +01:00
};
2023-02-02 12:31:38 +01:00
"git@ifsr.de" = {
2023-02-17 21:35:12 +01:00
match = "Host ifsr.de User git";
2023-04-06 22:31:45 +02:00
identityFile = git;
2023-02-02 12:31:38 +01:00
};
2023-11-20 22:47:07 +01:00
# AG DSN
"dijkstra" = {
hostname = "login.agdsn.tu-dresden.de";
user = "r5";
2023-12-17 17:22:51 +01:00
extraOptions = {
VerifyHostKeyDNS = "yes";
2024-06-22 16:28:09 +02:00
GSSAPIAuthentication = "yes";
2023-12-17 17:22:51 +01:00
};
2023-11-20 22:47:07 +01:00
};
"*.agdsn.network" = {
user = "r5";
extraOptions = {
2024-06-22 16:28:09 +02:00
# ProxyJump = "dijkstra";
2023-12-17 17:22:51 +01:00
VerifyHostKeyDNS = "yes";
2024-06-22 16:28:09 +02:00
GSSAPIAuthentication = "yes";
2023-11-20 22:47:07 +01:00
};
};
2023-10-26 12:12:45 +02:00
"git@git.agdsn.de" = {
match = "Host git.agdsn.de User git";
identityFile = git;
};
2023-01-06 10:37:50 +01:00
};
};
}