31 lines
688 B
Nix
31 lines
688 B
Nix
{ ... }:
|
|
{
|
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
|
|
sops.secrets."ssh/nixremote/private" = {
|
|
sopsFile = ../../secrets/default.yaml;
|
|
path = "/root/.ssh/nixremote";
|
|
};
|
|
|
|
services.openssh = {
|
|
enable = true;
|
|
ports = [ 22 ];
|
|
settings = {
|
|
PermitRootLogin = "no";
|
|
PasswordAuthentication = false;
|
|
};
|
|
};
|
|
|
|
programs.ssh = {
|
|
extraConfig = ''
|
|
Host lilith-server-builder
|
|
HostName 2a01:4f9:4a:1ecb::2
|
|
User nixremote
|
|
IdentityFile /root/.ssh/nixremote
|
|
Host lilith-pc-builder
|
|
HostName 2a02:8109:8323:4600:1394:b8b6:32d0:f720
|
|
User nixremote
|
|
IdentityFile /root/.ssh/nixremote
|
|
'';
|
|
};
|
|
}
|