This commit is contained in:
Yan Lin 2026-01-13 19:56:48 +01:00
parent 932f3f16f7
commit 8049e5548a

View file

@ -3,20 +3,6 @@
let
cfg = config.syncthing-custom;
# Common ignore patterns for all synced folders
commonIgnores = [
"*.tmp"
"*.temp"
".*.swp"
".*.swo"
".Trash"
".Trash-*"
"Thumbs.db"
];
# Convert ignore list to .stignore file content
stignoreContent = lib.concatStringsSep "\n" commonIgnores;
# Device groupings
pcDevices = [ "macbook" "imac" "thinkpad" "nfss" ];
touchDevices = [ "iphone" "ipad" ];
@ -150,22 +136,6 @@ in
config.RunAtLoad = true;
};
# Deploy .stignore files to synced folders (only for enabled folders)
home.file = lib.mkMerge [
(lib.mkIf (lib.elem "Credentials" cfg.enabledFolders) {
"Credentials/.stignore".text = stignoreContent;
})
(lib.mkIf (lib.elem "Documents" cfg.enabledFolders) {
"Documents/.stignore".text = stignoreContent;
})
(lib.mkIf (lib.elem "Media" cfg.enabledFolders) {
"Media/.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
# 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