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

85 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-07-30 19:41:51 +02:00
git = "/run/user/1000/secrets/ssh/git/private";
2023-04-06 22:31:45 +02:00
in
2023-01-06 10:37:50 +01:00
{
2023-07-30 19:41:51 +02:00
sops.secrets = {
"ssh/git/private" = { };
};
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-01-06 10:37:50 +01:00
matchBlocks = {
"artemis-git.inf.tu-dresden.de" = {
identityFile = git;
};
2023-03-09 19:15:05 +01:00
"se-gitlab.inf.tu-dresden.de" = {
2023-04-06 22:31:45 +02:00
identityFile = git;
2023-03-09 19:15:05 +01:00
};
2023-01-06 10:37:50 +01:00
"github.com" = {
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-06-05 12:31:07 +02:00
falkenstein-1 = matchBlocks."rfive.de";
2023-06-15 21:01:17 +02:00
"durian" = {
hostname = "manual.ifsr.de";
user = "root";
};
2023-02-03 11:43:09 +01:00
"kaki" = {
hostname = "kaki.ifsr.de";
user = "root";
};
2023-04-06 22:31:45 +02:00
"ifsr" = {
2023-02-03 11:43:09 +01:00
hostname = "ifsr.de";
user = "rouven.seifert";
};
2023-04-06 22:31:45 +02:00
"fsr" = matchBlocks."ifsr";
2023-02-03 11:43:09 +01:00
"quitte" = {
hostname = "quitte.ifsr.de";
user = "root";
extraOptions = {
RequestTTY = "yes";
RemoteCommand = "zsh -i";
};
2023-02-03 11:43:09 +01:00
};
"quitte-notty" = {
hostname = "quitte.ifsr.de";
user = "root";
};
2023-07-09 22:49:16 +02:00
"tomate" = {
hostname = "tomate.ifsr.de";
user = "root";
};
2023-01-23 19:15:45 +01:00
"nuc" = {
hostname = "192.168.1.2";
user = "root";
};
"router" = matchBlocks."cudy";
"cudy" = {
hostname = "192.168.1.1";
2023-01-23 19:15:45 +01:00
user = "root";
};
2023-01-06 10:37:50 +01:00
"git@raspi" = {
match = "Host raspi User git";
2023-04-06 22:31:45 +02:00
identityFile = git;
2023-01-06 10:37:50 +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-01-06 10:37:50 +01:00
};
2023-01-14 22:55:06 +01:00
extraConfig = ''
2023-09-06 13:35:16 +02:00
PKCS11Provider /run/current-system/sw/lib/libtpm2_pkcs11.so
2023-01-14 22:55:06 +01:00
IdentityFile ~/.ssh/id_ed25519
VisualHostKey = yes
2023-01-14 22:55:06 +01:00
'';
2023-01-06 10:37:50 +01:00
};
}