From abd4c0ffd01bbfd7f203ae75183d4c9734de331d Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 22 Jan 2025 21:06:11 -0600 Subject: sys/[lustrated]: enable syncthing --- sys/syncthing/default.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sys/syncthing/default.nix (limited to 'sys/syncthing/default.nix') diff --git a/sys/syncthing/default.nix b/sys/syncthing/default.nix new file mode 100644 index 0000000..c351e6c --- /dev/null +++ b/sys/syncthing/default.nix @@ -0,0 +1,31 @@ +{ 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}"; + }; + }; + }; +} -- cgit v1.2.3