nebula/sshd: Hardcode port 22

This commit is contained in:
SebastianStork 2026-01-11 14:14:01 +01:00
parent 3cf75dc7e1
commit e0b6239ab6
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -8,18 +8,12 @@ let
cfg = config.custom.services.nebula.node; cfg = config.custom.services.nebula.node;
in in
{ {
options.custom.services.nebula.node.sshd = { options.custom.services.nebula.node.sshd.enable = lib.mkEnableOption "" // {
enable = lib.mkEnableOption "" // { default = true;
default = true;
};
port = lib.mkOption {
type = lib.types.port;
default = 22;
};
}; };
config = lib.mkIf (cfg.enable && cfg.sshd.enable) { config = lib.mkIf (cfg.enable && cfg.sshd.enable) {
meta.ports.tcp = [ cfg.sshd.port ]; meta.ports.tcp = [ 22 ];
services = { services = {
openssh = { openssh = {
@ -28,7 +22,7 @@ in
ports = [ ]; ports = [ ];
listenAddresses = lib.singleton { listenAddresses = lib.singleton {
addr = cfg.address; addr = cfg.address;
inherit (cfg.sshd) port; port = 22;
}; };
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
@ -41,7 +35,7 @@ in
config.custom.services.nebula.peers config.custom.services.nebula.peers
|> lib.filter (node: node.isClient) |> lib.filter (node: node.isClient)
|> lib.map (nebula: { |> lib.map (nebula: {
inherit (cfg.sshd) port; port = 22;
proto = "tcp"; proto = "tcp";
host = nebula.name; host = nebula.name;
}); });