nixos-config/nixos/system/desktop/home-manager/ssh.nix

46 lines
1,001 B
Nix
Raw Normal View History

2022-09-15 00:57:40 +02:00
{ pkgs, lib, ... }:
2019-12-20 05:54:26 +01:00
with lib; {
2019-10-24 02:20:38 +02:00
home-manager.users.mainUser = {
programs.ssh.enable = true;
programs.ssh.matchBlocks = {
2022-01-15 10:57:16 +01:00
"*" = {
2022-09-23 20:29:18 +02:00
identityFile = "~/.ssh/palo_rsa.pub";
2019-10-24 02:20:38 +02:00
identitiesOnly = true;
2022-01-15 10:57:16 +01:00
};
"lassul.us" = {
2019-10-24 02:20:38 +02:00
user = "download";
port = 45621;
};
2020-01-03 10:08:59 +01:00
"*.r" = {
user = "root";
};
2021-03-05 08:22:35 +01:00
"*.secret" = {
user = "root";
};
2019-10-24 02:20:38 +02:00
"*.private" = {
user = "root";
};
2020-06-11 18:41:11 +02:00
"*.lan" = {
user = "root";
};
2019-10-24 02:20:38 +02:00
"github.com" = {
hostname = "ssh.github.com";
user = "root";
};
"es5.siteground.eu" = {
user = "ingolfwa";
port = 18765;
};
"*.onion" = {
user = "root";
};
2022-09-15 00:57:40 +02:00
#"*.compute.amazonaws.com".extraOptions = {
# ProxyCommand = ''
# sh -c "${pkgs.awscli2}/bin/aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
# '';
#};
2019-10-24 02:20:38 +02:00
};
};
}