From cddf7af3b591677e668041ea31ce44d2292aa41e Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Fri, 17 Oct 2025 13:55:59 +0200 Subject: [PATCH] fix syncthing ignore --- modules/syncthing.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/syncthing.nix b/modules/syncthing.nix index 6dc87ba..2b4f3e8 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -15,6 +15,9 @@ let "desktop.ini" ]; + # Convert ignore list to .stignore file content + stignoreContent = lib.concatStringsSep "\n" commonIgnores; + # Common versioning configuration commonVersioning = { type = "staggered"; @@ -64,21 +67,18 @@ in path = "~/Credentials"; devices = [ "mba" "imac" "iphone" "hs" "thinkpad" ]; ignorePerms = true; - ignores = commonIgnores; versioning = commonVersioning; }; "Documents" = { path = "~/Documents"; devices = [ "mba" "imac" "hs" "thinkpad" ]; ignorePerms = true; - ignores = commonIgnores; versioning = commonVersioning; }; "Obsidian" = { path = "~/Obsidian"; devices = [ "mba" "imac" "iphone" "hs" "thinkpad" ]; ignorePerms = true; - ignores = commonIgnores; versioning = commonVersioning; }; }; @@ -106,6 +106,11 @@ in config.RunAtLoad = true; }; + # Deploy .stignore files to synced folders + home.file."Credentials/.stignore".text = stignoreContent; + home.file."Documents/.stignore".text = stignoreContent; + home.file."Obsidian/.stignore".text = stignoreContent; + # For NixOS systems, we need to add Syncthing as a manual service in Traefik # Since Syncthing runs as a systemd service (not container), we'll handle routing via static config # or create a container wrapper for it to use with service discovery