nix-config/home/ssh/default.nix

40 lines
947 B
Nix
Raw Normal View History

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
2022-10-21 23:35:06 +02:00
"openwrt" = defaultBlock // { user = "root"; };
2022-01-18 09:32:55 +01:00
2022-10-21 23:35:06 +02:00
"suricata" = 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
};
};
}