{ config, lib, pkgs, ... }:
with lib; {

  test.services.syncthing = {
    guiAddress = "${config.networking.hostName}.private:8384";
    declarative = {
      overrideDevices = true;
      devices = let
        device = name: id: {
          "${name}" = {
            name = name;
            id = id;
            addresses =
              [ "tcp://${name}.private:22000" "tcp://${name}.private:21027" ];
          };
        };
      in (device "workhorse"
        "AFSAKB6-JLH4QAS-DSRMPI3-6PVCIHF-IIAVLPC-STPNO3Y-YRDU5NW-QD445QI")
      // (device "pepe"
        "SZLXFW3-VTAC7UB-V2Z7CHE-3VZAYPL-6D72AK6-OCDMPZP-G4FPY5P-FL6ZVAG")
      // (device "workout"
        "DZOOAKG-GI2SVOS-QEVMFL7-TRHVTPQ-ADIJEVH-RH5WV3J-6M7MJHC-C53EOAC")
      // (device "sterni"
        "ZFNNKPD-ZSOAYJQ-VROXXDB-5MD3UTJ-GDCNTSQ-G5POVV3-UZG5HFT-CCAU3AD") // {
          "porani" = {
            name = "porani";
            id =
              "6YOIA4E-X52ZD5Z-FPNWPRS-77QIMMU-VDIXVZB-6BPQN7A-FFJDU4W-EXEGFAI";
            addresses =
              [ "tcp://porani.insecure:22000" "tcp://porani.insecure:21027" ];
          };
        } // {
          smartphone = {
            name = "smartphone";
            id =
              "PRCA4KO-PEMLUSO-ERUSKAP-GUDSW2I-AYTEB54-E5JJOXJ-23X2UYP-RLSMKQM";
            addresses = [ "dynamic" ];
          };
        } // {
          bumba = {
            name = "windows-bumba";
            id =
              "JS7PWTO-VKFGBUP-GNFLSWP-MGFJ2KH-HLO2LKW-V3RPCR6-PCB5SQC-42FCKQZ";
            addresses = [ "dynamic" ];
          };
        } // {
          mors = {
            name = "lassulus-mors";
            id =
              "ZPRS57K-YK32ROQ-7A6MRAV-VOYXQ3I-CQCXISZ-C5PCV2A-GSFLG3I-K7UGGAH";
            addresses = [ "tcp://mors.r:22000" ];
          };
        };

      folders = {

        # needs to be on encrypted drives
        # -------------------------------
        private = {
          enable = lib.mkDefault false;
          watch = false;
          devices = [ "workout" "workhorse" "pepe" "sterni" ];
        };
        desktop = {
          enable = lib.mkDefault false;
          watch = false;
          devices = [ "workout" "workhorse" "pepe" "sterni" ];
        };
        finance = {
          enable = lib.mkDefault false;
          watch = false;
          devices = [ "workout" "workhorse" "pepe" "sterni" ];
        };
        fotos = {
          enable = lib.mkDefault false;
          watch = false;
          devices = [ "workout" "workhorse" "pepe" "sterni" ];
        };

        # no need to be stored on encrypted drives
        # ----------------------------------------
        book = {
          enable = lib.mkDefault false;
          id = "wwbvs-5lfbh";
          watch = false;
          devices = [ "workout" "pepe" "sterni" ];
        };
        lost-fotos = {
          enable = lib.mkDefault false;
          watch = false;
          devices = [ "workout" "workhorse" "sterni" ];
        };
        movies = {
          enable = lib.mkDefault false;
          id = "vatmy-c2qf4";
          watch = false;
          devices = [ "workhorse" "porani" ];
        };
        porn = {
          enable = lib.mkDefault false;
          watch = false;
          devices = [ "workhorse" ];
        };
        music-library = {
          enable = lib.mkDefault false;
          id = "gytmq-r2zrx";
          watch = false;
          devices = [ "porani" "workout" "workhorse" "pepe" "sterni" ];
        };
        music-library-free = {
          enable = lib.mkDefault false;
          id = "mu9mn-zgvsw";
          watch = false;
          devices = [ "workout" "workhorse" "mors" ];
        };
        music-projects = {
          enable = lib.mkDefault false;
          id = "acfhu-r4t4f";
          watch = false;
          devices = [ "workout" "workhorse" "pepe" "sterni" ];
        };
        podcasts = {
          enable = lib.mkDefault false;
          id = "yvzmx-hcomd";
          watch = false;
          devices = [ "workhorse" "porani" ];
        };
        samples = {
          enable = lib.mkDefault false;
          id = "pcgkj-tjucd";
          watch = false;
          devices = [ "workout" "workhorse" "sterni" ];
        };
        series = {
          enable = lib.mkDefault false;
          id = "all-series";
          watch = false;
          devices = [ "workhorse" "porani" ];
        };
        smartphone-music = {
          enable = lib.mkDefault false;
          id = "0vjze-xvs8n";
          watch = false;
          devices = [ "sterni" "smartphone" ];
        };
        smartphone-fotos = {
          enable = lib.mkDefault false;
          id = "e5823_jtbr-photos";
          watch = false;
          devices = [ "sterni" "workout" "pepe" "smartphone" ];
        };
        video-material = {
          enable = lib.mkDefault false;
          id = "wgkun-fec5h";
          watch = false;
          devices = [ "workout" "workhorse" ];
        };

        windows-sync = {
          enable = lib.mkDefault false;
          id = "hcity-p5ikc";
          watch = false;
          devices = [ "bumba" "workout" ];
        };
        workout-pepe = {
          enable = lib.mkDefault false;
          devices = [ "pepe" "workout" ];
          watch = false;
        };
      };

    };
  };

}