From 6ff52fda4fe3407b3b80f0a7ad1e4aed16b35a4d Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Tue, 18 Nov 2025 18:49:56 +0100 Subject: [PATCH] Add Archive syncthing directory --- modules/syncthing.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/syncthing.nix b/modules/syncthing.nix index 0a89f2a..547de45 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -34,8 +34,8 @@ in options.syncthing-custom = { enabledFolders = lib.mkOption { type = lib.types.listOf lib.types.str; - default = [ "Credentials" "Documents" "Obsidian" ]; - description = "List of Syncthing folders to enable for this host. Available: Credentials, Documents, Obsidian"; + default = [ "Credentials" "Documents" "Obsidian" "Archive" ]; + description = "List of Syncthing folders to enable for this host."; }; }; @@ -98,6 +98,14 @@ in ignorePerms = true; versioning = commonVersioning; }; + }) + // (lib.optionalAttrs (lib.elem "Archive" cfg.enabledFolders) { + "Archive" = { + path = "~/Archive"; + devices = [ "iphone" "hs" "thinkpad" "ipad" "macbook" ]; + ignorePerms = true; + versioning = commonVersioning; + }; }); # GUI settings with authentication @@ -134,6 +142,9 @@ in (lib.mkIf (lib.elem "Obsidian" cfg.enabledFolders) { "Obsidian/.stignore".text = stignoreContent; }) + (lib.mkIf (lib.elem "Archive" cfg.enabledFolders) { + "Archive/.stignore".text = stignoreContent; + }) ]; # For NixOS systems, we need to add Syncthing as a manual service in Traefik