niksos/hosts/niks/ssh/default.nix

51 lines
1.4 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;
2023-10-03 19:22:24 +02:00
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
2023-07-20 13:33:32 +02:00
};
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
2023-10-03 19:22:24 +02:00
HostName aur.archlinux.org
2023-09-08 16:10:15 +02:00
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
}