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