syncthing-relay

This commit is contained in:
2024-08-03 18:11:44 +03:00
parent 9b9b609a5f
commit 1dc59683e8
3 changed files with 38 additions and 20 deletions

View File

@@ -0,0 +1,23 @@
{ config, lib, ... }:
let
cfg = config.mj.services.syncthing-relay;
in
{
options.mj.services.syncthing-relay = with lib.types; {
enable = lib.mkEnableOption "enable syncthing-relay";
};
config = lib.mkIf cfg.enable {
services.syncthing.relay = {
enable = true;
providedBy = "jakstys.lt";
};
systemd.services.syncthing-relay.restartIfChanged = false;
networking.firewall.allowedTCPPorts = [
config.services.syncthing.relay.port
config.services.syncthing.relay.statusPort
];
};
}