From db364a0c013f876dc0d4a2d8bf2cfccb7ce3affc Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Sun, 1 Oct 2023 15:02:13 -0400 Subject: Syncthing exposed frontend and added devices --- hostnix/weebnix/syncthing.nix | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'hostnix/weebnix/syncthing.nix') diff --git a/hostnix/weebnix/syncthing.nix b/hostnix/weebnix/syncthing.nix index 8fca87b..2690e78 100644 --- a/hostnix/weebnix/syncthing.nix +++ b/hostnix/weebnix/syncthing.nix @@ -3,9 +3,20 @@ { services.syncthing = { enable = true; + openDefaultPorts = true; + guiAddress = "[::1]:8384"; devices = { "sparky" = { id = "FE43LDI-33WS467-LIGFWCC-5PPSKN6-GYODEWJ-KLQZLN7-H3GYGLG-IJ2JGQW"; + introducer = true; + autoAcceptFolders = true; + }; + "Joes-iPhone-6" = { + id = "F5APH5K-XXO454B-6YU4BTT-YPHF4KT-OD7YF5Y-JTWJRSU-UNJ2KZK-IVJZNQT"; + autoAcceptFolders = true; + }; + "iPad" = { + id = "U7D7667-RFEFHXX-TUJGGII-CE62S6P-YC6MWNV-4LBJ4YJ-5ZUZVPT-GBC5PQH"; autoAcceptFolders = true; }; }; @@ -20,11 +31,20 @@ maxAge = "31536000"; }; }; - devices = [ "sparky" ]; + devices = [ "sparky" "Joes-iPhone-6" "iPad" ]; }; }; }; - networking.firewall.allowedTCPPorts = [ 22000 ]; - networking.firewall.allowedUDPPorts = [ 21027 22000 ]; + services.nginx.virtualHosts."st.weebnix.mou.fo" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://[::1]:8384"; + # https://docs.syncthing.net/users/faq.html#why-do-i-get-host-check-error-in-the-gui-api + recommendedProxySettings = false; + }; + }; + + services.oauth2_proxy.nginx.virtualHosts = [ "st.weebnix.mou.fo" ]; } -- cgit v1.3.1