niksos/hosts/niks/ssh/default.nix
2023-10-03 19:22:24 +02:00

50 lines
1.4 KiB
Nix

_: {
imports = [ ./ssh-agent.nix ];
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
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
HostName aur.archlinux.org
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
'';
}