From 7ee5eb7cf49741bc2273999894725bdd3c7b946a Mon Sep 17 00:00:00 2001 From: Tyler Starr Date: Thu, 9 Nov 2023 16:12:34 -0800 Subject: [PATCH] update syncthing for vault --- provision/hosts/bulwark/syncthing.nix | 5 +++++ provision/hosts/kestrel/syncthing.nix | 10 ++++++++++ provision/hosts/torus/syncthing.nix | 10 ++++++++++ 3 files changed, 25 insertions(+) diff --git a/provision/hosts/bulwark/syncthing.nix b/provision/hosts/bulwark/syncthing.nix index d693ef5c..da7345e8 100644 --- a/provision/hosts/bulwark/syncthing.nix +++ b/provision/hosts/bulwark/syncthing.nix @@ -1,10 +1,15 @@ { config, lib, pkgs, user, ... }: { + networking.firewall.allowedTCPPorts = [ 8384 22000 ]; + networking.firewall.allowedUDPPorts = [ 22000 21027 ]; + environment.systemPackages = with pkgs; [ syncthing ]; + services.syncthing = { enable = true; user = "${user}"; configDir = "/home/${user}/.config/syncthing"; + guiAddress = "0.0.0.0:8384"; overrideDevices = true; overrideFolders = true; devices = { diff --git a/provision/hosts/kestrel/syncthing.nix b/provision/hosts/kestrel/syncthing.nix index e349988c..49f89856 100644 --- a/provision/hosts/kestrel/syncthing.nix +++ b/provision/hosts/kestrel/syncthing.nix @@ -1,14 +1,20 @@ { config, lib, pkgs, user, ... }: { + networking.firewall.allowedTCPPorts = [ 8384 22000 ]; + networking.firewall.allowedUDPPorts = [ 22000 21027 ]; + environment.systemPackages = with pkgs; [ syncthing ]; + services.syncthing = { enable = true; user = "${user}"; configDir = "/home/${user}/.config/syncthing"; + guiAddress = "0.0.0.0:8384"; overrideDevices = true; overrideFolders = true; devices = { "bulwark" = { id = "B5HZK2V-WA4WSQF-3JAIH4I-C6XQZ6J-EMMAIV5-CCYOA5G-N57GT6A-WH2GCQ2"; }; + "torus" = { id = "WCZYHD7-5Y33SSU-74JHAQR-V7LYMDM-SDG2NTN-DJ2VKF2-DUBBUE5-PU5CGQN"; }; }; folders = { "Gamecube Saves" = { @@ -19,6 +25,10 @@ path = "/home/${user}/.local/share/yuzu/nand/user/save/0000000000000000/705C6CE0127692D598F92E68B640D644"; devices = [ "bulwark" ]; }; + "Vault" = { + path = "/home/${user}/documents/vault"; + devices = [ "torus" ]; + }; }; }; } diff --git a/provision/hosts/torus/syncthing.nix b/provision/hosts/torus/syncthing.nix index 980ef1cb..f7dd4dac 100644 --- a/provision/hosts/torus/syncthing.nix +++ b/provision/hosts/torus/syncthing.nix @@ -1,15 +1,25 @@ { config, lib, pkgs, user, ... }: { + networking.firewall.allowedTCPPorts = [ 8384 22000 ]; + networking.firewall.allowedUDPPorts = [ 22000 21027 ]; + environment.systemPackages = with pkgs; [ syncthing ]; + services.syncthing = { enable = true; user = "${user}"; configDir = "/home/${user}/.config/syncthing"; + guiAddress = "0.0.0.0:8384"; overrideDevices = true; overrideFolders = true; devices = { + "kestrel" = { id = "TY6I6UK-YWXZYB4-7DKSB5Y-6ZBGE6U-T5WNJK4-KPLTXP7-ZTZQPXU-LX4HPQZ"; }; }; folders = { + "Vault" = { + path = "/engi/apps/dufs/vault"; + devices = [ "kestrel" ]; + }; }; }; }