2021-03-13 01:02:28 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.home.ssh;
|
|
|
|
in
|
2021-02-20 16:25:55 +01:00
|
|
|
{
|
2023-03-16 17:39:13 +01:00
|
|
|
options.my.home.ssh = with lib; {
|
|
|
|
enable = my.mkDisableOption "ssh configuration";
|
2021-03-13 01:02:28 +01:00
|
|
|
};
|
|
|
|
|
2021-09-24 01:13:23 +02:00
|
|
|
config.programs.ssh = lib.mkIf cfg.enable {
|
2021-02-20 16:25:55 +01:00
|
|
|
enable = true;
|
|
|
|
|
2023-02-15 16:02:15 +01:00
|
|
|
includes = [
|
|
|
|
# Local configuration, not-versioned
|
|
|
|
"config.local"
|
|
|
|
];
|
|
|
|
|
2021-02-20 16:25:55 +01:00
|
|
|
matchBlocks = {
|
|
|
|
"github.com" = {
|
|
|
|
hostname = "github.com";
|
|
|
|
identityFile = "~/.ssh/shared_rsa";
|
|
|
|
user = "git";
|
|
|
|
};
|
|
|
|
|
|
|
|
"gitlab.com" = {
|
|
|
|
hostname = "gitlab.com";
|
|
|
|
identityFile = "~/.ssh/shared_rsa";
|
|
|
|
user = "git";
|
|
|
|
};
|
|
|
|
|
|
|
|
"git.sr.ht" = {
|
|
|
|
hostname = "git.sr.ht";
|
|
|
|
identityFile = "~/.ssh/shared_rsa";
|
|
|
|
user = "git";
|
|
|
|
};
|
|
|
|
|
2021-02-24 11:31:31 +01:00
|
|
|
"gitea.belanyi.fr" = {
|
|
|
|
hostname = "gitea.belanyi.fr";
|
|
|
|
identityFile = "~/.ssh/shared_rsa";
|
|
|
|
user = "git";
|
|
|
|
};
|
|
|
|
|
2021-02-20 16:25:55 +01:00
|
|
|
porthos = {
|
|
|
|
hostname = "91.121.177.163";
|
|
|
|
identityFile = "~/.ssh/shared_rsa";
|
|
|
|
user = "ambroisie";
|
|
|
|
};
|
2022-01-25 15:46:17 +01:00
|
|
|
|
|
|
|
work = {
|
|
|
|
hostname = "workspaces.dgexsol.fr";
|
|
|
|
identityFile = "~/.ssh/shared_rsa";
|
|
|
|
user = "bruno_belanyi";
|
|
|
|
};
|
2021-02-20 16:25:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
AddKeysToAgent yes
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|