summaryrefslogtreecommitdiff
path: root/hostnix
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2023-10-01 15:02:13 -0400
committerJoe Mou <dev@mou.fo>2023-10-01 16:12:56 -0400
commitdb364a0c013f876dc0d4a2d8bf2cfccb7ce3affc (patch)
treeb0d126a78300d0f221c1554edac93cea82749c51 /hostnix
parent1f1535546e51db3c0a83c406744de21d4a479e53 (diff)
Syncthing exposed frontend and added devices
Diffstat (limited to 'hostnix')
-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" ];
}