49 lines
1.1 KiB
Nix
49 lines
1.1 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;
|
|
|
|
home.file.".ssh/bitbucket_ed25519.pub".source = ./bitbucket_ed25519.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;
|
|
"cuina" = defaultBlock;
|
|
"capibara" = defaultBlock;
|
|
"pikvm" = defaultBlock;
|
|
"narwhal" = defaultBlock;
|
|
"trantor" = defaultBlock;
|
|
"axolotl" = defaultBlock;
|
|
"caladan" = defaultBlock;
|
|
"fugu" = defaultBlock;
|
|
|
|
"bitbucket.org" = defaultBlock // {
|
|
user = "git";
|
|
identityFile = "~/.ssh/bitbucket_ed25519";
|
|
};
|
|
|
|
};
|
|
};
|
|
}
|