diff --git a/components/network/syncthing.nix b/components/network/syncthing.nix index 1dae709..9170106 100644 --- a/components/network/syncthing.nix +++ b/components/network/syncthing.nix @@ -1,14 +1,4 @@ { config, lib, pkgs, factsGenerator, clanLib, ... }: -let - clanMachines = - lib.mapAttrs - (machine: facts: { - name = machine; - id = facts."syncthing.pub"; - addresses = [ "tcp://[${facts."zerotier-ip"}]:22000" ]; - }) - (clanLib.readFactsFromAllMachines [ "syncthing.pub" "zerotier-ip" ]); -in with lib; { # networking.firewall.interfaces."gummybears".allowedTCPPorts = [ 8384 ]; @@ -22,6 +12,14 @@ with lib; { cert = config.clan.core.facts.services.syncthing.secret."syncthing.cert".path; settings.devices = let + clanMachines = + lib.mapAttrs + (machine: facts: { + name = machine; + id = facts."syncthing.pub"; + addresses = [ "tcp://[${facts."zerotier-ip"}]:22000" ]; + }) + (clanLib.readFactsFromAllMachines [ "syncthing.pub" "zerotier-ip" ]); device = machine: id: { "${machine}" = { name = machine; @@ -37,8 +35,6 @@ with lib; { settings.folders = { - # needs to be on encrypted drives - # ------------------------------- audiobooks = { enable = lib.mkDefault false; path = lib.mkDefault "/tmp/audiobooks"; @@ -102,16 +98,6 @@ with lib; { path = lib.mkDefault "/tmp/password-store"; devices = [ "cream" "cherry" "orbi" ]; }; - # todo remove if zfs is is used - #nextcloud_backup = { - # enable = lib.mkDefault false; - # path = lib.mkDefault "/tmp/lost-fotos"; - # devices = [ "chungus" ]; - # versioning = { - # type = "simple"; - # params.keep = "2"; - # }; - #}; }; }; diff --git a/machines/cherry/syncthing.nix b/machines/cherry/syncthing.nix index 2417a3f..6d02291 100644 --- a/machines/cherry/syncthing.nix +++ b/machines/cherry/syncthing.nix @@ -1,6 +1,5 @@ { config, pkgs, lib, ... }: { - services.syncthing = { enable = true; openDefaultPorts = false; @@ -10,9 +9,6 @@ configDir = "/home/palo/.syncthing"; overrideFolders = true; settings.folders = { - - # on encrypted drive - # ------------------ oscar_cpap = { enable = true; path = "/home/palo/Documents/OSCAR_Data"; @@ -42,9 +38,6 @@ path = "/home/palo/share"; type = "sendonly"; }; - - # no need to be encrypted - # ----------------------- books = { enable = true; path = "/home/palo/books"; diff --git a/machines/chungus/media-syncthing.nix b/machines/chungus/media-syncthing.nix index f0bf40c..5e10f6d 100644 --- a/machines/chungus/media-syncthing.nix +++ b/machines/chungus/media-syncthing.nix @@ -5,10 +5,7 @@ overrideFolders = true; user = "media"; group = "media"; - # make some folders send only settings.folders = { - # on encrypted drive - # ------------------ oscar_cpap = { enable = true; path = "/syncthing/oscar_cpap"; diff --git a/machines/cream/syncthing.nix b/machines/cream/syncthing.nix index e065eed..f7e9c2c 100644 --- a/machines/cream/syncthing.nix +++ b/machines/cream/syncthing.nix @@ -10,9 +10,6 @@ configDir = "/home/palo/.syncthing"; overrideFolders = true; settings.folders = { - - # on encrypted drive - # ------------------ oscar_cpap = { enable = true; path = "/home/palo/Documents/OSCAR_Data"; @@ -25,10 +22,6 @@ enable = true; path = "/home/palo/logseq"; }; - #private = { - # enable = true; - # path = "/home/palo/private"; - #}; art = { enable = true; path = "/home/palo/art"; @@ -46,9 +39,6 @@ path = "/home/palo/share"; type = "sendonly"; }; - - # no need to be encrypted - # ----------------------- books = { enable = true; path = "/home/palo/books"; diff --git a/machines/usbstick/syncthing.nix b/machines/usbstick/syncthing.nix index 0778de2..bc07e88 100644 --- a/machines/usbstick/syncthing.nix +++ b/machines/usbstick/syncthing.nix @@ -8,9 +8,6 @@ configDir = "/home/palo/.syncthing"; overrideFolders = true; folders = { - - # on encrypted drive - # ------------------ private = { enable = true; path = "/home/palo/private";