summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/default.nix1
-rw-r--r--sys/syncthing/default.nix31
2 files changed, 32 insertions, 0 deletions
diff --git a/sys/default.nix b/sys/default.nix
index 86553e5..662d8a3 100644
--- a/sys/default.nix
+++ b/sys/default.nix
@@ -24,6 +24,7 @@ with lib; {
./nspawn
./preset
./seat
+ ./syncthing
./virt
./web
];
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}";
+ };
+ };
+ };
+}