45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
|
{ config, pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
defaultBlock = {
|
||
|
identitiesOnly = true;
|
||
|
identityFile = "~/.ssh/id_rsa_gpg.pub";
|
||
|
certificateFile = "~/.ssh/id_rsa_gpg-cert.pub";
|
||
|
forwardAgent = true;
|
||
|
port = 22;
|
||
|
};
|
||
|
in {
|
||
|
home.file.".ssh/id_rsa_gpg.pub".source = ./id_rsa_gpg.pub;
|
||
|
home.file.".ssh/id_rsa_gpg-cert.pub".source = ./id_rsa_gpg-cert.pub;
|
||
|
programs.ssh = {
|
||
|
enable = true;
|
||
|
matchBlocks = {
|
||
|
|
||
|
"github.com" = defaultBlock;
|
||
|
|
||
|
"opnsense" = defaultBlock // { hostname = "10.0.0.1"; };
|
||
|
"openwrt" = defaultBlock // {
|
||
|
user = "root";
|
||
|
hostname = "10.0.0.15";
|
||
|
};
|
||
|
|
||
|
"suricata" = defaultBlock;
|
||
|
"lb" = defaultBlock;
|
||
|
"kitchen" = defaultBlock;
|
||
|
"capibara" = defaultBlock;
|
||
|
"pikvm" = defaultBlock;
|
||
|
"narwhal" = defaultBlock;
|
||
|
"trantor" = defaultBlock;
|
||
|
"axolotl" = defaultBlock;
|
||
|
"caladan" = defaultBlock;
|
||
|
"fugu" = defaultBlock;
|
||
|
|
||
|
"bitbucket.org" = defaultBlock // {
|
||
|
user = "git";
|
||
|
identityFile = "~/.ssh/bitbucket_rsa";
|
||
|
};
|
||
|
|
||
|
};
|
||
|
};
|
||
|
}
|