home: add ssh

This commit is contained in:
Bruno BELANYI 2021-02-20 15:25:55 +00:00
parent 44cbc123e6
commit d5c9a3717f
2 changed files with 37 additions and 0 deletions

View file

@ -9,6 +9,7 @@
./packages.nix
./pager.nix
./secrets # Home-manager specific secrets
./ssh.nix
./tmux.nix
./zsh
];

36
home/ssh.nix Normal file
View file

@ -0,0 +1,36 @@
{ ... }:
{
programs.ssh = {
enable = true;
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";
};
porthos = {
hostname = "91.121.177.163";
identityFile = "~/.ssh/shared_rsa";
user = "ambroisie";
};
};
extraConfig = ''
AddKeysToAgent yes
'';
};
}