From 11a4bd0bbf10cdacc8c3c1440ad56542d2a1cfdb Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 25 Mar 2024 15:10:24 +0100 Subject: [PATCH] Rework formatting of syncthing folder settings --- modules/system/syncthing.nix | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/modules/system/syncthing.nix b/modules/system/syncthing.nix index 4d112fc..ac1683a 100644 --- a/modules/system/syncthing.nix +++ b/modules/system/syncthing.nix @@ -23,35 +23,45 @@ }; folders = let - devices = ["seb-desktop" "dell-laptop"]; - versioning = { + allDevices = ["seb-desktop" "dell-laptop"]; + staggeredVersioning = { type = "staggered"; params = { cleanInterval = "3600"; # 1 hour in seconds maxAge = "15552000"; # 180 days in seconds }; }; - ignorePerms = false; in { Documents = { path = "/home/seb/Documents"; - inherit devices versioning ignorePerms; + devices = allDevices; + versioning = staggeredVersioning; + ignorePerms = false; }; Downloads = { path = "/home/seb/Downloads"; - inherit devices versioning ignorePerms; + devices = allDevices; + versioning = staggeredVersioning; + ignorePerms = false; }; Pictures = { path = "/home/seb/Pictures"; - inherit devices versioning ignorePerms; + devices = allDevices; + versioning = staggeredVersioning; + ignorePerms = false; }; Music = { path = "/home/seb/Music"; - inherit devices versioning ignorePerms; + devices = allDevices; + versioning = staggeredVersioning; + ignorePerms = false; }; Videos = { path = "/home/seb/Videos"; - inherit devices versioning ignorePerms; + devices = allDevices; + versioning = staggeredVersioning; + ignorePerms = false; + }; }; }; };