From 8f603a3f218bf35285a50c03f257902eca3efa61 Mon Sep 17 00:00:00 2001
From: lassulus <lassulus@lassul.us>
Date: Fri, 28 Jan 2022 11:05:19 +0100
Subject: [PATCH] syncthing: remove declarative namespace

---
 krebs/2configs/syncthing.nix   | 8 +++-----
 lass/2configs/sync/decsync.nix | 2 +-
 lass/2configs/sync/sync.nix    | 2 +-
 lass/2configs/sync/weechat.nix | 2 +-
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/krebs/2configs/syncthing.nix b/krebs/2configs/syncthing.nix
index 125e2aea4..dac1863d5 100644
--- a/krebs/2configs/syncthing.nix
+++ b/krebs/2configs/syncthing.nix
@@ -8,11 +8,9 @@ in {
   services.syncthing = {
     enable = true;
     configDir = "/var/lib/syncthing";
-    declarative = {
-      devices = mk_peers used_peers;
-      key = toString <secrets/syncthing.key>;
-      cert = toString <secrets/syncthing.cert>;
-    };
+    devices = mk_peers used_peers;
+    key = toString <secrets/syncthing.key>;
+    cert = toString <secrets/syncthing.cert>;
   };
 
   boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288;
diff --git a/lass/2configs/sync/decsync.nix b/lass/2configs/sync/decsync.nix
index 9caefdd2d..a38cff8d6 100644
--- a/lass/2configs/sync/decsync.nix
+++ b/lass/2configs/sync/decsync.nix
@@ -1,5 +1,5 @@
 {
-  services.syncthing.declarative.folders.decsync = {
+  services.syncthing.folders.decsync = {
     path = "/home/lass/decsync";
     devices = [ "mors" "blue" "green" "phone" ];
   };
diff --git a/lass/2configs/sync/sync.nix b/lass/2configs/sync/sync.nix
index 7c0f2e030..a0927c199 100644
--- a/lass/2configs/sync/sync.nix
+++ b/lass/2configs/sync/sync.nix
@@ -1,5 +1,5 @@
 {
-  services.syncthing.declarative.folders."/home/lass/sync" = {
+  services.syncthing.folders."/home/lass/sync" = {
     devices = [ "mors" "icarus" "xerxes" "shodan" "green" "blue" "coaxmetal" ];
   };
   krebs.permown."/home/lass/sync" = {
diff --git a/lass/2configs/sync/weechat.nix b/lass/2configs/sync/weechat.nix
index 7970f3081..eb6b0aa16 100644
--- a/lass/2configs/sync/weechat.nix
+++ b/lass/2configs/sync/weechat.nix
@@ -1,5 +1,5 @@
 {
-  services.syncthing.declarative.folders."/home/lass/.weechat".devices = [ "green" "mors" ];
+  services.syncthing.folders."/home/lass/.weechat".devices = [ "green" "mors" ];
   krebs.permown."/home/lass/.weechat" = {
     owner = "lass";
     group = "syncthing";