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