Files
2026-07-11 14:56:13 -04:00

28 lines
566 B
Nix

{ config, lib, pkgs, ... }:
let
me = config.network.nodes.${config.network.node};
in
{
networking.firewall = {
enable = true;
interfaces.wg0.allowedTCPPorts = [ 22 ];
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
listenAddresses = [{
addr = me.address-vpn;
port = 22;
}];
};
users.users.root.openssh.authorizedKeys.keys = [
config.network.nodes.laptop.ssh
config.network.nodes.desktop.ssh
];
}