{ config, lib, ... }: with lib; let cfg = config.local.syncthing; in { options.local.syncthing = { enable = mkEnableOption "syncthing server"; }; config = mkIf cfg.enable { services.syncthing = { enable = true; systemService = true; overrideFolders = false; overrideDevices = false; openDefaultPorts = true; guiAddress = "127.0.0.1:8384"; settings.options.urAccepted = -1; relay = { enable = true; pools = [ ]; providedBy = "${config.networking.hostName}.${config.networking.domain}"; }; }; }; }