mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 13:09:08 +01:00
syncthing: Rename option syncPort to port
This commit is contained in:
parent
c25c4341b3
commit
ac83b330a1
1 changed files with 4 additions and 4 deletions
|
|
@ -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";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue