From ac83b330a1482ff16f11b0f9fc5631f92d2a2a00 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Tue, 17 Mar 2026 20:36:14 +0100 Subject: [PATCH] syncthing: Rename option `syncPort` to `port` --- modules/nixos/services/syncthing.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nixos/services/syncthing.nix b/modules/nixos/services/syncthing.nix index 1505b3f..7c94f7d 100644 --- a/modules/nixos/services/syncthing.nix +++ b/modules/nixos/services/syncthing.nix @@ -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"; };