From 7d9ec83e15545e2946aea14c28c5d68caa9bce85 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 1 Dec 2023 00:00:42 +0100 Subject: [PATCH] Move syncthing options to new format --- roles/common/services/syncthing.nix | 58 ++++++++++++++-------------- roles/desktop/services/syncthing.nix | 2 +- roles/gaming/services/syncthing.nix | 2 +- roles/school/services/syncthing.nix | 2 +- roles/server/syncthing.nix | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/roles/common/services/syncthing.nix b/roles/common/services/syncthing.nix index 966b866..9a090ab 100755 --- a/roles/common/services/syncthing.nix +++ b/roles/common/services/syncthing.nix @@ -5,39 +5,39 @@ overrideDevices = true; overrideFolders = true; openDefaultPorts = true; - extraOptions = { + settings = { options = { urAccepted = 3; }; - }; - # Set up devices and folders common to every device - devices = { - "phone" = { - name = "Xiaomi Redmi Note 10 Pro"; - id = "K7KNZ5V-XREUADL-CROQXPV-6AA4H65-2VUD34Z-VQWKJ6S-LWWW4EE-XPNEZQ6"; + # Set up devices and folders common to every device + devices = { + "phone" = { + name = "Xiaomi Redmi Note 10 Pro"; + id = "K7KNZ5V-XREUADL-CROQXPV-6AA4H65-2VUD34Z-VQWKJ6S-LWWW4EE-XPNEZQ6"; + }; + "pc" = { + name = "Archie"; + id = "NJPX754-64AQNP3-7GZFIRZ-W2EDRJQ-27ORWYM-X5YXEXQ-ERRTRTQ-BSYD4AY"; + }; + "steamdeck" = { + name = "Steam Deck"; + id = "DNFEGEA-PDEVW5A-O5VBVQK-IUXI7J5-MAHCQAG-2JLEFFM-DSXB6AS-TX6ZHAN"; + }; + "server" = { + name = "Everest"; + id = "BVJBCAZ-WDIWBFR-CK3WB3N-TWH3UXX-EPZXVWE-BLQ3IDU-U7MHVVB-WO4BKAJ"; + }; + "surface" = { + name = "Surface Go"; + id = "HTVSF3O-AHY3TNH-BLVSEGK-HRRSMHC-H5LJWVF-NDKGM6O-ATWZALC-YXNV2Q4"; + }; }; - "pc" = { - name = "Archie"; - id = "NJPX754-64AQNP3-7GZFIRZ-W2EDRJQ-27ORWYM-X5YXEXQ-ERRTRTQ-BSYD4AY"; - }; - "steamdeck" = { - name = "Steam Deck"; - id = "DNFEGEA-PDEVW5A-O5VBVQK-IUXI7J5-MAHCQAG-2JLEFFM-DSXB6AS-TX6ZHAN"; - }; - "server" = { - name = "Everest"; - id = "BVJBCAZ-WDIWBFR-CK3WB3N-TWH3UXX-EPZXVWE-BLQ3IDU-U7MHVVB-WO4BKAJ"; - }; - "surface" = { - name = "Surface Go"; - id = "HTVSF3O-AHY3TNH-BLVSEGK-HRRSMHC-H5LJWVF-NDKGM6O-ATWZALC-YXNV2Q4"; - }; - }; - folders = { - "passwords" = { - label = "KeePassXC Passwords"; - id = "rdyaq-ex659"; - devices = [ "phone" "pc" "steamdeck" "server" "surface"]; + folders = { + "passwords" = { + label = "KeePassXC Passwords"; + id = "rdyaq-ex659"; + devices = [ "phone" "pc" "steamdeck" "server" "surface"]; + }; }; }; }; diff --git a/roles/desktop/services/syncthing.nix b/roles/desktop/services/syncthing.nix index c650ba9..84dc962 100644 --- a/roles/desktop/services/syncthing.nix +++ b/roles/desktop/services/syncthing.nix @@ -6,7 +6,7 @@ user = "toast"; group = "users"; dataDir = config.users.users.toast.home; - folders."passwords".path = "~/Documents/Passwords"; + settings.folders."passwords".path = "~/Documents/Passwords"; }; # Allow regular users to stop syncthing # https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service diff --git a/roles/gaming/services/syncthing.nix b/roles/gaming/services/syncthing.nix index d275d88..ed786b6 100644 --- a/roles/gaming/services/syncthing.nix +++ b/roles/gaming/services/syncthing.nix @@ -6,7 +6,7 @@ TODO: turn this into a module eventually */ - services.syncthing.folders = { + services.syncthing.settings.folders = { "steam-201810" = { label = "Wolfenstein The New Order Saves"; id = "laxxf-t2wmy"; diff --git a/roles/school/services/syncthing.nix b/roles/school/services/syncthing.nix index aac049a..9663c57 100644 --- a/roles/school/services/syncthing.nix +++ b/roles/school/services/syncthing.nix @@ -1,7 +1,7 @@ { config, ... }: { - services.syncthing.folders = { + services.syncthing.settings.folders = { "school-things" = { label = "School things"; id = "z6alc-nfoqr"; diff --git a/roles/server/syncthing.nix b/roles/server/syncthing.nix index 9c84f89..489324d 100755 --- a/roles/server/syncthing.nix +++ b/roles/server/syncthing.nix @@ -11,7 +11,7 @@ key = config.age.secrets.syncthingKey.path; cert = config.age.secrets.syncthingCert.path; guiAddress = "0.0.0.0:8384"; - folders = { + settings.folders = { "passwords" = { path = "${config.services.syncthing.dataDir}/passwords"; };