2022-01-25 21:21:15 +00:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
signers-directory = "${config.home.homeDirectory}/.ssh/allowed_signers";
|
|
|
|
in
|
2022-01-10 21:41:52 +00:00
|
|
|
{
|
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
forwardAgent = false;
|
|
|
|
compression = false;
|
|
|
|
hashKnownHosts = true;
|
|
|
|
serverAliveInterval = 60;
|
|
|
|
extraConfig = ''
|
|
|
|
UpdateHostKeys ask
|
|
|
|
VerifyHostKeyDNS yes
|
|
|
|
'';
|
|
|
|
|
|
|
|
matchBlocks = {
|
|
|
|
# Work
|
|
|
|
|
|
|
|
"git.app.nedeco.de" = {
|
|
|
|
port = 22;
|
|
|
|
user = "git";
|
2022-03-17 09:33:21 +00:00
|
|
|
identityFile = "~/.ssh/nedeco_gitlab.pub";
|
2022-01-10 21:41:52 +00:00
|
|
|
identitiesOnly = true;
|
|
|
|
compression = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
"nedeco-smartos-hosting" = {
|
|
|
|
host = "10.0.90.*";
|
|
|
|
port = 22;
|
|
|
|
user = "root";
|
2022-03-17 09:33:21 +00:00
|
|
|
identityFile = "~/.ssh/nedeco.pub";
|
2022-01-10 21:41:52 +00:00
|
|
|
identitiesOnly = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Private
|
|
|
|
|
|
|
|
"github.com" = {
|
|
|
|
port = 22;
|
|
|
|
user = "git";
|
2022-03-17 09:33:21 +00:00
|
|
|
identityFile = "~/.ssh/GitHub.pub";
|
2022-01-10 21:41:52 +00:00
|
|
|
identitiesOnly = true;
|
|
|
|
compression = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
"gitlab.com" = {
|
|
|
|
port = 22;
|
|
|
|
user = "git";
|
2022-03-19 21:54:55 +00:00
|
|
|
identityFile = "~/.ssh/GitLab.pub";
|
2022-01-10 21:41:52 +00:00
|
|
|
identitiesOnly = true;
|
|
|
|
compression = true;
|
|
|
|
};
|
|
|
|
|
2022-01-11 22:13:08 +00:00
|
|
|
"router" = {
|
|
|
|
hostname = "10.0.0.1";
|
|
|
|
port = 22;
|
|
|
|
user = "root";
|
|
|
|
};
|
|
|
|
|
2022-01-10 21:41:52 +00:00
|
|
|
"nas" = {
|
2022-01-11 22:13:08 +00:00
|
|
|
hostname = "10.0.0.100";
|
2022-01-10 21:41:52 +00:00
|
|
|
port = 22;
|
|
|
|
user = "daniel";
|
2022-03-17 09:33:21 +00:00
|
|
|
identityFile = "~/.ssh/NAS.pub";
|
2022-01-10 21:41:52 +00:00
|
|
|
identitiesOnly = true;
|
|
|
|
compression = true;
|
|
|
|
};
|
|
|
|
};
|
2022-01-11 22:13:08 +00:00
|
|
|
|
|
|
|
includes = [
|
|
|
|
"~/.ssh/config_work"
|
|
|
|
];
|
2022-01-10 21:41:52 +00:00
|
|
|
};
|
2022-01-25 21:21:15 +00:00
|
|
|
|
|
|
|
home.file."${signers-directory}" = {
|
|
|
|
source = ../config/ssh/allowed_signers;
|
|
|
|
recursive = true;
|
|
|
|
};
|
2022-01-10 21:41:52 +00:00
|
|
|
}
|