2022-01-18 09:32:55 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
2022-10-21 23:35:06 +02:00
|
|
|
let
|
|
|
|
defaultBlock = {
|
|
|
|
identitiesOnly = true;
|
|
|
|
identityFile = "~/.ssh/id_rsa_yubikey.pub";
|
|
|
|
certificateFile = "~/.ssh/id_rsa_yubikey-cert.pub";
|
|
|
|
forwardAgent = true;
|
|
|
|
port = 22;
|
|
|
|
};
|
|
|
|
in {
|
2022-01-18 09:32:55 +01:00
|
|
|
home.file.".ssh/id_rsa_yubikey.pub".source = ./id_rsa_yubikey.pub;
|
2022-09-02 17:59:18 +02:00
|
|
|
home.file.".ssh/id_rsa_yubikey-cert.pub".source = ./id_rsa_yubikey-cert.pub;
|
2022-01-18 09:32:55 +01:00
|
|
|
programs.ssh = {
|
|
|
|
enable = true;
|
|
|
|
matchBlocks = {
|
|
|
|
|
2022-10-21 23:35:06 +02:00
|
|
|
"github.com" = defaultBlock;
|
2022-01-18 09:32:55 +01:00
|
|
|
|
2023-03-16 17:52:32 +01:00
|
|
|
"opnsense" = defaultBlock // { hostname = "10.0.0.1"; };
|
2023-05-07 16:56:13 +02:00
|
|
|
"openwrt" = defaultBlock // {
|
|
|
|
user = "root";
|
|
|
|
hostname = "10.0.0.15";
|
|
|
|
};
|
2022-01-18 09:32:55 +01:00
|
|
|
|
2022-10-21 23:35:06 +02:00
|
|
|
"suricata" = defaultBlock;
|
2023-06-04 11:04:53 +02:00
|
|
|
"lb" = defaultBlock;
|
2023-06-25 11:26:39 +02:00
|
|
|
"kitchen" = defaultBlock;
|
2023-02-06 18:14:13 +01:00
|
|
|
"capibara" = defaultBlock;
|
2023-02-03 17:43:26 +01:00
|
|
|
"echidna" = defaultBlock;
|
2022-10-21 23:35:06 +02:00
|
|
|
"pikvm" = defaultBlock;
|
|
|
|
"narwhal" = defaultBlock;
|
|
|
|
"trantor" = defaultBlock;
|
|
|
|
"axolotl" = defaultBlock;
|
|
|
|
"caladan" = defaultBlock;
|
|
|
|
"fugu" = defaultBlock;
|
2022-01-18 09:32:55 +01:00
|
|
|
|
2022-10-21 23:35:06 +02:00
|
|
|
"bitbucket.org" = defaultBlock // {
|
2022-07-11 15:21:47 +02:00
|
|
|
user = "git";
|
|
|
|
identityFile = "~/.ssh/bitbucket_rsa";
|
|
|
|
};
|
|
|
|
|
2022-01-18 09:32:55 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|