From c95fa674c2cd63825d590a1e000e247852863d6d Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Sun, 7 Sep 2025 03:39:12 +0200 Subject: [PATCH] Add file versioning and GUI password to syncthing --- modules/syncthing.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/modules/syncthing.nix b/modules/syncthing.nix index af50a47..e0b4f13 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -40,19 +40,48 @@ path = "~/Credentials"; devices = [ "ipad" "mba" "iphone" "imac" "hs" ]; ignorePerms = true; + versioning = { + type = "staggered"; + params = { + maxAge = "15552000"; # 180 days in seconds + cleanInterval = "3600"; # Clean every hour + }; + }; }; "Documents" = { path = "~/Documents"; devices = [ "mba" "imac" "hs" ]; ignorePerms = true; + versioning = { + type = "staggered"; + params = { + maxAge = "15552000"; # 180 days in seconds + cleanInterval = "3600"; # Clean every hour + }; + }; }; "Obsidian" = { path = "~/Obsidian"; devices = [ "ipad" "mba" "iphone" "imac" "hs" ]; ignorePerms = true; + versioning = { + type = "staggered"; + params = { + maxAge = "15552000"; # 180 days in seconds + cleanInterval = "3600"; # Clean every hour + }; + }; }; }; + # GUI settings with authentication + gui = { + enabled = true; + user = "yanlin"; + password = "1Hayashi-2Hiko"; # You should change this password + useTLS = false; # TLS is handled by Traefik + }; + # Additional settings options = { urAccepted = -1; # Disable usage reporting