From ca4090709587b525a5960458c42d27945f84e280 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 19 May 2023 12:00:01 +0100 Subject: [PATCH] Update syncthing expressions for new API extraOptions -> settings devices -> settings.devices folders -> settings.folders --- cspell.json | 2 +- syncthing/H0615.nix | 22 +++---- syncthing/Vanguard.nix | 2 +- syncthing/default.nix | 2 +- syncthing/devices/H0615.nix | 2 +- syncthing/devices/ion.nix | 2 +- syncthing/devices/monarch.nix | 2 +- syncthing/devices/northstar.nix | 2 +- syncthing/devices/remarkable.nix | 2 +- syncthing/devices/vanguard.nix | 2 +- syncthing/folders/default.nix | 102 +++++++++++++++---------------- 11 files changed, 70 insertions(+), 72 deletions(-) diff --git a/cspell.json b/cspell.json index 9c286f91..04a643d4 100644 --- a/cspell.json +++ b/cspell.json @@ -1 +1 @@ -{"flagWords":[],"words":["Hyprland","Gitea","Nextcloud","NIXOS","NVIM","HOMEMANAGER","pkgs","nixpkgs","waybar","Dexperimental","gvfs","wezterm","bitwarden","marktext","zotero","traefik","websecure","macchiato","catppuccin"],"language":"en","version":"0.2"} +{"flagWords":[],"words":["Hyprland","Gitea","Nextcloud","NIXOS","NVIM","HOMEMANAGER","pkgs","nixpkgs","waybar","Dexperimental","gvfs","wezterm","bitwarden","marktext","zotero","traefik","websecure","macchiato","catppuccin","syncthing"],"language":"en","version":"0.2"} diff --git a/syncthing/H0615.nix b/syncthing/H0615.nix index b814bbae..de38c3cf 100644 --- a/syncthing/H0615.nix +++ b/syncthing/H0615.nix @@ -4,21 +4,21 @@ user = "elitherl"; group = "users"; dataDir = "/home/elitherl"; - folders = { - Sync = { - path = "/home/elitherl/Sync"; - label = "UKAEA"; - id = "fwzht-j7hrc"; - devices = ["ion"]; - ignorePerms = true; - enable = true; - }; - }; - extraOptions = { + settings = { options = { globalAnnounceEnabled = true; localAnnounceEnabled = true; }; + folders = { + Sync = { + path = "/home/elitherl/Sync"; + label = "UKAEA"; + id = "fwzht-j7hrc"; + devices = ["ion"]; + ignorePerms = true; + enable = true; + }; + }; }; }; } diff --git a/syncthing/Vanguard.nix b/syncthing/Vanguard.nix index 86d86fe5..226eafb4 100644 --- a/syncthing/Vanguard.nix +++ b/syncthing/Vanguard.nix @@ -10,7 +10,7 @@ user = "xenia"; group = "users"; dataDir = "/mnt/secondary/syncthing"; - folders = { + settings.folders = { "Archive" = { path = "/mnt/secondary/syncthing/archive"; devices = ["ion" "monarch" "northstar"]; diff --git a/syncthing/default.nix b/syncthing/default.nix index 7fe8adf5..71a75283 100644 --- a/syncthing/default.nix +++ b/syncthing/default.nix @@ -4,7 +4,7 @@ enable = true; systemService = true; openDefaultPorts = true; - extraOptions = { + settings = { options = { globalAnnounceEnabled = lib.mkDefault false; localAnnounceEnabled = lib.mkDefault true; diff --git a/syncthing/devices/H0615.nix b/syncthing/devices/H0615.nix index 7e83bc20..911a8d9d 100644 --- a/syncthing/devices/H0615.nix +++ b/syncthing/devices/H0615.nix @@ -1,3 +1,3 @@ {...}: { - services.syncthing.devices."H0615" = {id = "VVKKUT6-DMNEJ6J-ZI2QREG-SOLG7S5-V2V6WN3-UCQH2EN-6S2XXLS-FKN6KQF";}; + services.syncthing.settings.devices."H0615" = {id = "VVKKUT6-DMNEJ6J-ZI2QREG-SOLG7S5-V2V6WN3-UCQH2EN-6S2XXLS-FKN6KQF";}; } diff --git a/syncthing/devices/ion.nix b/syncthing/devices/ion.nix index b3083bd1..f0f90942 100644 --- a/syncthing/devices/ion.nix +++ b/syncthing/devices/ion.nix @@ -1,3 +1,3 @@ {...}: { - services.syncthing.devices."ion" = {id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";}; + services.syncthing.settings.devices."ion" = {id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";}; } diff --git a/syncthing/devices/monarch.nix b/syncthing/devices/monarch.nix index 210f0a12..643fe585 100644 --- a/syncthing/devices/monarch.nix +++ b/syncthing/devices/monarch.nix @@ -1,3 +1,3 @@ {...}: { - services.syncthing.devices."monarch" = {id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ";}; + services.syncthing.settings.devices."monarch" = {id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ";}; } diff --git a/syncthing/devices/northstar.nix b/syncthing/devices/northstar.nix index b3390d65..ec5afc60 100644 --- a/syncthing/devices/northstar.nix +++ b/syncthing/devices/northstar.nix @@ -1,3 +1,3 @@ {...}: { - services.syncthing.devices."northstar" = {id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD";}; + services.syncthing.settings.devices."northstar" = {id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD";}; } diff --git a/syncthing/devices/remarkable.nix b/syncthing/devices/remarkable.nix index 92161962..1ad70f34 100644 --- a/syncthing/devices/remarkable.nix +++ b/syncthing/devices/remarkable.nix @@ -1,3 +1,3 @@ {...}: { - services.syncthing.devices."remarkable" = {id = "GHB6JKS-JOA3HHP-TYHB3IJ-GLV26QW-RWRZAMG-XYFGFB6-QLUHDSH-GNPZVAO";}; + services.syncthing.settings.devices."remarkable" = {id = "GHB6JKS-JOA3HHP-TYHB3IJ-GLV26QW-RWRZAMG-XYFGFB6-QLUHDSH-GNPZVAO";}; } diff --git a/syncthing/devices/vanguard.nix b/syncthing/devices/vanguard.nix index fc9a7cbb..a8e8ced3 100644 --- a/syncthing/devices/vanguard.nix +++ b/syncthing/devices/vanguard.nix @@ -1,3 +1,3 @@ {...}: { - services.syncthing.devices."vanguard" = {id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ";}; + services.syncthing.settings.devices."vanguard" = {id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ";}; } diff --git a/syncthing/folders/default.nix b/syncthing/folders/default.nix index 2794106d..1ab5f638 100644 --- a/syncthing/folders/default.nix +++ b/syncthing/folders/default.nix @@ -1,56 +1,54 @@ {lib, ...}: { - services.syncthing = { - folders = { - "Archive" = { - label = "Archive"; - id = "hwnqy-xzcdx"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Books" = { - label = "Books"; - id = "zjmxy-ycmbq"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Camera" = { - label = "Camera"; - id = "fp4_4j7w-photos"; - type = "receiveonly"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Documents" = { - label = "Documents"; - id = "qc6qa-bipsd"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Exports" = { - label = "Exports"; - id = "tof2e-pdtde"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Movies" = { - label = "Movies"; - id = "3f75o-4x6sq"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Pictures" = { - label = "Pictures"; - id = "ziuj8-rm6dn"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Xochitl" = { - label = "Xochitl"; - id = "dkcbx-kq7hl"; - type = "receiveonly"; - ignorePerms = true; - enable = lib.mkDefault false; - }; + services.syncthing.settings.folders = { + "Archive" = { + label = "Archive"; + id = "hwnqy-xzcdx"; + ignorePerms = true; + enable = lib.mkDefault false; + }; + "Books" = { + label = "Books"; + id = "zjmxy-ycmbq"; + ignorePerms = true; + enable = lib.mkDefault false; + }; + "Camera" = { + label = "Camera"; + id = "fp4_4j7w-photos"; + type = "receiveonly"; + ignorePerms = true; + enable = lib.mkDefault false; + }; + "Documents" = { + label = "Documents"; + id = "qc6qa-bipsd"; + ignorePerms = true; + enable = lib.mkDefault false; + }; + "Exports" = { + label = "Exports"; + id = "tof2e-pdtde"; + ignorePerms = true; + enable = lib.mkDefault false; + }; + "Movies" = { + label = "Movies"; + id = "3f75o-4x6sq"; + ignorePerms = true; + enable = lib.mkDefault false; + }; + "Pictures" = { + label = "Pictures"; + id = "ziuj8-rm6dn"; + ignorePerms = true; + enable = lib.mkDefault false; + }; + "Xochitl" = { + label = "Xochitl"; + id = "dkcbx-kq7hl"; + type = "receiveonly"; + ignorePerms = true; + enable = lib.mkDefault false; }; }; }