summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hostnix/weebnix/syncthing.nix26
1 files changed, 23 insertions, 3 deletions
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" ];
}