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

89 lines
1.9 KiB
Nix
Raw Normal View History

2023-05-19 11:42:43 +02:00
{ ... }:
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
{
2023-04-06 22:31:45 +02:00
programs.ssh = rec {
2023-01-06 10:37:50 +01:00
enable = true;
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
2023-11-20 23:55:55 +01:00
CanonicalDomains agdsn.network
2023-11-20 22:47:07 +01:00
PKCS11Provider /run/current-system/sw/lib/libtpm2_pkcs11.so
IdentityFile ~/.ssh/id_ed25519
VisualHostKey = yes
'';
2023-01-06 10:37:50 +01:00
matchBlocks = {
2023-11-20 22:47:07 +01:00
# personal use
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
};
"rfive.de" = {
2023-06-05 15:21:24 +02:00
hostname = "falkenstein.vpn.rfive.de";
2023-04-12 15:05:15 +02:00
user = "root";
2023-05-30 22:44:35 +02:00
port = 2222;
extraOptions = {
VerifyHostKeyDNS = "ask";
};
2023-01-06 10:37:50 +01:00
};
2023-11-20 22:47:07 +01:00
# used for nix remote building
2023-11-20 23:55:55 +01:00
falkenstein = matchBlocks."rfive.de";
2023-11-20 22:47:07 +01:00
"nuc" = {
hostname = "192.168.42.2";
2023-06-15 21:01:17 +02:00
user = "root";
};
2023-11-20 22:47:07 +01:00
"router" = {
hostname = "192.168.42.1";
2023-02-03 11:43:09 +01:00
user = "root";
};
2023-11-20 22:47:07 +01:00
# iFSR
"fsr" = {
2023-02-03 11:43:09 +01:00
hostname = "ifsr.de";
user = "rouven.seifert";
};
2023-11-20 23:55:55 +01:00
"quitte" = {
hostname = "quitte.ifsr.de";
user = "root";
};
"durian" = {
hostname = "durian.ifsr.de";
user = "root";
};
"tomate" = {
hostname = "tomate.ifsr.de";
user = "root";
};
"kaki" = {
hostname = "kaki.ifsr.de";
2023-01-23 19:15:45 +01:00
user = "root";
};
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";
};
"*.agdsn.network" = {
user = "r5";
extraOptions = {
ProxyJump = "dijkstra";
};
};
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
};
};
}