fix syncthing proxy
fix syncthing proxy
This commit is contained in:
committed by
Joakim Repomaa
parent
2d6e8607f3
commit
953d2b5c5d
@@ -10,15 +10,11 @@ in
|
||||
enable = true;
|
||||
dataDir = "/mnt/storage/syncthing";
|
||||
openDefaultPorts = true;
|
||||
guiAddress = "127.0.0.1:${toString port}";
|
||||
guiAddress = "[::1]:${toString port}";
|
||||
settings.gui.insecureSkipHostCheck = true;
|
||||
};
|
||||
|
||||
modules.webserver.vHosts.${fqdn}.locations."/" = {
|
||||
proxy = "http://127.0.0.1:${toString port}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
modules.webserver.vHosts.${fqdn}.locations."/".proxy = "http://localhost:${toString port}";
|
||||
|
||||
fileSystems."${storage_dir}" = {
|
||||
device = "//u407959.your-storagebox.de/backup/syncthing";
|
||||
|
||||
@@ -3,7 +3,6 @@ let
|
||||
cfg = config.modules.webserver;
|
||||
|
||||
nginxVhost = options: {
|
||||
http2 = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = lib.mkIf cfg.acme.dnsChallenge null;
|
||||
@@ -29,6 +28,10 @@ let
|
||||
|
||||
vhost = lib.types.submodule {
|
||||
options = {
|
||||
http2 = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
proxyBuffering = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
@@ -71,7 +74,8 @@ in
|
||||
recommendedOptimisation = true;
|
||||
|
||||
virtualHosts = lib.mapAttrs
|
||||
(_: { proxyBuffering, locations }: nginxVhost {
|
||||
(_: { proxyBuffering, locations, http2 }: nginxVhost {
|
||||
inherit http2;
|
||||
extraConfig = lib.mkIf (!proxyBuffering) ''
|
||||
proxy_buffering off;
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user