From 630e32cc9db35249a7d788236207c68a5fb8d401 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 13 Nov 2019 00:00:04 +0100 Subject: [PATCH] Set up Syncthing reverse proxy --- Timeline.org | 11 +++++++---- modules/datasync.nix | 6 +++--- modules/networking.nix | 1 - modules/webstack.nix | 4 +++- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Timeline.org b/Timeline.org index 69ef5e8..4b682c8 100644 --- a/Timeline.org +++ b/Timeline.org @@ -34,12 +34,14 @@ - [X] Basic configuration - [X] Relay server - [ ] Discovery server -*** DONE Radicale +*** DONE Radicale [0/2] [0%] CLOSED: [2019-11-08 Fri 13:51] + - [ ] Harden password + - [ ] Encrypt password ** Web stack [1/7] [14%] -*** IN-PROGRESS Nginx [1/5] [20%] +*** IN-PROGRESS Nginx [2/5] [40%] - [X] Radicale reverse proxy - - [ ] Syncthing reverse proxy + - [X] Syncthing reverse proxy - [ ] Wallabag vhost - [ ] Gitea vhost - [ ] Miniflux vhost @@ -47,10 +49,11 @@ - [ ] Php-fpm *** TODO PostgreSQL [0/1] [0%] - [ ] Restore DBs -*** DONE ACME [2/2] [100%] +*** DONE ACME [2/3] [66%] CLOSED: [2019-11-10 Sun 21:47] - [X] Obtain certs - [X] Automatic renewal + - [ ] Generate dhparam *** TODO Wallabag *** TODO Miniflux *** TODO Hugo [0/2] [0%] diff --git a/modules/datasync.nix b/modules/datasync.nix index 2ca1750..6abc95b 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -23,11 +23,11 @@ #cert = ""; #key = ""; folders = { - "Documents" = { devices = [ "monolith" ]; id = "wusdj-bfjkr"; }; + "Documents" = { devices = [ "monolith" "roamer" ]; id = "wusdj-bfjkr"; }; "Notes" = { devices = [ "monolith" "roamer" ]; id = "2aqt7-vpprc"; }; - "Music" = { devices = [ "monolith" ]; id = "kafhz-bfmzm"; }; + "Music" = { devices = [ "monolith" "roamer" ]; id = "kafhz-bfmzm"; }; "Photos" = { devices = [ "monolith" "roamer" ]; id = "mjibc-ustcg"; }; - "Security" = { devices = [ "monolith" ]; id = "z4lpn-pmm3v"; }; + "Security" = { devices = [ "monolith" "roamer" ]; id = "z4lpn-pmm3v"; }; "Projects" = { devices = [ "monolith" ]; id = "cjhmu-avy9v"; }; Documents.type = "receiveonly"; diff --git a/modules/networking.nix b/modules/networking.nix index 358cbb7..82bf288 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -20,7 +20,6 @@ 631 # Cups 6566 # SANE 22067 # Syncthing relay - 8384 # Syncthing GUI 80 443 ]; diff --git a/modules/webstack.nix b/modules/webstack.nix index 5c19d58..97f895a 100644 --- a/modules/webstack.nix +++ b/modules/webstack.nix @@ -54,10 +54,12 @@ proxyPass = "http://localhost:5232/"; extraConfig = '' proxy_set_header X-Script-Name /radicale; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass_header Authorization; ''; }; + locations."/syncthing/" = { + proxyPass = "http://localhost:8384/"; + }; }; }; };