diff options
Diffstat (limited to 'adonis')
| -rw-r--r-- | adonis/autopush/default.nix | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/adonis/autopush/default.nix b/adonis/autopush/default.nix index 6a160d3..a2a13ee 100644 --- a/adonis/autopush/default.nix +++ b/adonis/autopush/default.nix @@ -54,7 +54,7 @@ in { services.mollysocket = { enable = true; settings = { - allowed_endpoints = ["https://${domain}"]; + allowed_endpoints = ["https://push.${domain}"]; webserver = true; }; environmentFile = config.sops.secrets."autopush/mollysocket".path; @@ -63,33 +63,22 @@ in { services.nginx.virtualHosts.${domain} = { forceSSL = true; enableACME = true; - locations = { - "/mollysocket" = { - proxyPass = "http://127.0.0.1:8020"; - extraConfig = '' - proxy_set_header Host $host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - ''; - }; - "/" = { - proxyPass = "http://127.0.0.1:8080"; - extraConfig = '' - proxy_http_version 1.1; - proxy_set_header Host $host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_connect_timeout 3m; - proxy_send_timeout 3m; - proxy_read_timeout 3m; - client_max_body_size 0; - proxy_buffering off; - proxy_request_buffering off; - proxy_redirect off; - ''; - }; + locations."/" = { + proxyPass = "http://127.0.0.1:8080"; + extraConfig = '' + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_connect_timeout 3m; + proxy_send_timeout 3m; + proxy_read_timeout 3m; + client_max_body_size 0; + proxy_buffering off; + proxy_request_buffering off; + proxy_redirect off; + ''; }; }; services.nginx.virtualHosts."updates.${domain}" = { @@ -107,4 +96,17 @@ in { ''; }; }; + services.nginx.virtualHosts."mollysocket.${domain}" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8020"; + extraConfig = '' + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + ''; + }; + }; } |
