niksos/hosts/niks/ssh/default.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

2023-09-08 16:10:15 +02:00
_: {
2023-07-20 13:41:31 +02:00
imports = [ ./ssh-agent.nix ];
2023-07-20 13:33:32 +02:00
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
2023-09-08 16:10:15 +02:00
programs.ssh.extraConfig = ''
AddKeysToAgent yes
Host github
HostName github.com
User git
IdentityFile ~/.ssh/githubkey
IdentitiesOnly yes
Host git.dupa.edu.pl
HostName git.dupa.edu.pl
User git
IdentityFile ~/.ssh/gitdupaedupl
IdentitiesOnly yes
Host codeberg
HostName codeberg.org
User git
IdentityFile ~/.ssh/codeberg
IdentitiesOnly yes
Host gitlab
HostName gitlab.com
User git
IdentityFile ~/.ssh/gitlab
IdentitiesOnly yes
Host aur
IdentityFile ~/.ssh/aur
User aur
Host chmura
HostName 192.168.15.17
User chmura
IdentityFile ~/.ssh/chmura
IdentitiesOnly yes
Host malina
HostName 192.168.15.13
User malina
IdentityFile ~/.ssh/malina
IdentitiesOnly yes
'';
2023-07-20 13:33:32 +02:00
}