From c19346276c07394cb5fbce0794a783c67aed584d Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Wed, 27 Sep 2023 16:23:48 -0400 Subject: Initial Syncthing module --- hostnix/weebnix/syncthing.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 hostnix/weebnix/syncthing.nix (limited to 'hostnix/weebnix/syncthing.nix') diff --git a/hostnix/weebnix/syncthing.nix b/hostnix/weebnix/syncthing.nix new file mode 100644 index 0000000..8fca87b --- /dev/null +++ b/hostnix/weebnix/syncthing.nix @@ -0,0 +1,30 @@ +{ ... }: + +{ + services.syncthing = { + enable = true; + devices = { + "sparky" = { + id = "FE43LDI-33WS467-LIGFWCC-5PPSKN6-GYODEWJ-KLQZLN7-H3GYGLG-IJ2JGQW"; + autoAcceptFolders = true; + }; + }; + folders = { + "Sync" = { + id = "7thks-5badk"; + path = "/var/lib/syncthing/Sync"; + versioning = { + type = "staggered"; + params = { + cleanInterval = "3600"; + maxAge = "31536000"; + }; + }; + devices = [ "sparky" ]; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ 22000 ]; + networking.firewall.allowedUDPPorts = [ 21027 22000 ]; +} -- cgit v1.3.1