From 577bc93b8d65089fe444da9ea16666ed9dfa2c09 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Thu, 27 Nov 2025 21:38:51 +0100 Subject: [PATCH] add new syncthing folder to nixos peers --- hosts/nixos/hs/home.nix | 4 ++++ hosts/nixos/thinkpad/home.nix | 4 ++++ modules/syncthing.nix | 8 +++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hosts/nixos/hs/home.nix b/hosts/nixos/hs/home.nix index 6698526..516d9c3 100644 --- a/hosts/nixos/hs/home.nix +++ b/hosts/nixos/hs/home.nix @@ -10,6 +10,10 @@ ]; # hs-specific home configuration + + syncthing-custom = { + enabledFolders = [ "Credentials" "Documents" "Obsidian" "Archive" "NSFW" ]; + }; # yt-dlp configuration - store videos on large storage programs.yt-dlp-custom = { diff --git a/hosts/nixos/thinkpad/home.nix b/hosts/nixos/thinkpad/home.nix index 766a0b6..aad0b87 100644 --- a/hosts/nixos/thinkpad/home.nix +++ b/hosts/nixos/thinkpad/home.nix @@ -17,6 +17,10 @@ ../../../modules/schedule.nix ]; + syncthing-custom = { + enabledFolders = [ "Credentials" "Documents" "Obsidian" "Archive" "NSFW" ]; + }; + services.scheduled-commands.aicloud-backup = { enable = true; description = "Backup aicloud files"; diff --git a/modules/syncthing.nix b/modules/syncthing.nix index d22a2d8..8acbd78 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -22,8 +22,10 @@ let stignoreContent = lib.concatStringsSep "\n" commonIgnores; # Device groupings - pcDevices = [ "hs" "thinkpad" "macbook" ]; + nixosDevices = [ "hs" "thinkpad" ]; + darwinDevices = [ "macbook" ]; touchDevices = [ "iphone" "ipad" ]; + pcDevices = nixosDevices ++ darwinDevices; allDevices = pcDevices ++ touchDevices; # Common versioning configuration @@ -113,9 +115,9 @@ in }; }) // (lib.optionalAttrs (lib.elem "NSFW" cfg.enabledFolders) { - "Archive" = { + "NSFW" = { path = "~/NSFW"; - devices = pcDevices; + devices = nixosDevices; ignorePerms = true; versioning = commonVersioning; };