Commit 1bdc77a0c3bc

Vincent Demeester <vincent@sbr.pm>
2025-11-27 22:36:30
home/syncthing: Display the syncthing folder for the host.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent ca4d611
Changed files (1)
home
common
home/common/services/syncthing.nix
@@ -2,10 +2,18 @@
   globals,
   hostname,
   libx,
+  lib,
   ...
 }:
+let
+  folders =
+    libx.generateSyncthingFolders hostname globals.machines."${hostname}" globals.machines
+      globals.syncthingFolders;
+  folderNames = lib.mapAttrsToList (id: folder: folder.label or id) folders;
+  folderList = lib.concatStringsSep ", " folderNames;
+in
 {
-  warnings = [ "Home syncthing for ${hostname}" ];
+  warnings = [ "Home syncthing for ${hostname} with folders: ${folderList}" ];
   services.syncthing = {
     enable = true;
     overrideFolders = false; # Just in case, will probably set to true later
@@ -16,9 +24,7 @@
       #   ignores = { lines = [ "(?d).DS_Store" "**" ]; };
       # };
       devices = libx.generateSyncthingDevices hostname globals.machines;
-      folders =
-        libx.generateSyncthingFolders hostname globals.machines."${hostname}" globals.machines
-          globals.syncthingFolders;
+      folders = folders;
     };
   };
 }