syncthing: Rename option syncPort to port

This commit is contained in:
SebastianStork 2026-03-17 20:36:14 +01:00
parent c25c4341b3
commit ac83b330a1
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -20,7 +20,7 @@ in
type = lib.types.nonEmptyStr; type = lib.types.nonEmptyStr;
default = "${self}/hosts/${netCfg.hostName}/keys/syncthing.id" |> lib.readFile |> lib.trim; default = "${self}/hosts/${netCfg.hostName}/keys/syncthing.id" |> lib.readFile |> lib.trim;
}; };
syncPort = lib.mkOption { port = lib.mkOption {
type = lib.types.port; type = lib.types.port;
default = 22000; default = 22000;
}; };
@ -120,7 +120,7 @@ in
|> lib.mapAttrs ( |> lib.mapAttrs (
_: host: { _: host: {
id = host.config.custom.services.syncthing.deviceId; id = host.config.custom.services.syncthing.deviceId;
addresses = lib.singleton "tcp://${host.config.custom.networking.overlay.address}:${toString host.config.custom.services.syncthing.syncPort}"; addresses = lib.singleton "tcp://${host.config.custom.networking.overlay.address}:${toString host.config.custom.services.syncthing.port}";
} }
); );
@ -135,7 +135,7 @@ in
}); });
options = { options = {
listenAddress = "tcp://${netCfg.overlay.address}:${toString cfg.syncPort}"; listenAddress = "tcp://${netCfg.overlay.address}:${toString cfg.port}";
globalAnnounceEnabled = false; globalAnnounceEnabled = false;
localAnnounceEnabled = false; localAnnounceEnabled = false;
relaysEnabled = false; relaysEnabled = false;
@ -149,7 +149,7 @@ in
}; };
nebula.networks.mesh.firewall.inbound = lib.singleton { nebula.networks.mesh.firewall.inbound = lib.singleton {
port = cfg.syncPort; inherit (cfg) port;
proto = "tcp"; proto = "tcp";
group = "syncthing"; group = "syncthing";
}; };