From c40e2b75a95a031f3c758611024764b94badd55d Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Thu, 19 Sep 2024 00:02:41 +0200 Subject: [PATCH] Move nginx extra config in to location --- .../devices/headless/server/home-assistant/proxy.nix | 8 ++++---- .../devices/headless/server/log-management.nix | 12 ++++++------ configuration/devices/headless/server/monitoring.nix | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configuration/devices/headless/server/home-assistant/proxy.nix b/configuration/devices/headless/server/home-assistant/proxy.nix index e2082ebc..21554795 100644 --- a/configuration/devices/headless/server/home-assistant/proxy.nix +++ b/configuration/devices/headless/server/home-assistant/proxy.nix @@ -22,11 +22,11 @@ in { locations."/" = { inherit proxyPass; proxyWebsockets = true; - }; - extraConfig = '' - proxy_buffering off; - ''; + extraConfig = '' + proxy_buffering off; + ''; + }; }; "${config.networking.hostName}.local" = { diff --git a/configuration/devices/headless/server/log-management.nix b/configuration/devices/headless/server/log-management.nix index 0df3e02f..f579ea2a 100644 --- a/configuration/devices/headless/server/log-management.nix +++ b/configuration/devices/headless/server/log-management.nix @@ -11,14 +11,14 @@ proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}"; proxyWebsockets = true; basicAuth = secrets.nginx.basicAuth."grafana.00a.ch"; - }; - extraConfig = '' - satisfy any; + extraConfig = '' + satisfy any; - allow 192.168.1.0/24; - deny all; - ''; + allow 192.168.1.0/24; + deny all; + ''; + }; }; }; diff --git a/configuration/devices/headless/server/monitoring.nix b/configuration/devices/headless/server/monitoring.nix index 6e954106..f14fd9be 100644 --- a/configuration/devices/headless/server/monitoring.nix +++ b/configuration/devices/headless/server/monitoring.nix @@ -10,14 +10,14 @@ locations."/" = { proxyPass = "http://127.0.0.1:${toString config.services.monitoring.webPort}"; basicAuth = secrets.nginx.basicAuth."monitoring.00a.ch"; - }; - extraConfig = '' - satisfy any; + extraConfig = '' + satisfy any; - allow 192.168.1.0/24; - deny all; - ''; + allow 192.168.1.0/24; + deny all; + ''; + }; }; };