From 7c43dda1194ab36d62872205038c099c6c11feac Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 4 May 2024 06:19:56 +0300 Subject: [PATCH] nuc graf nginx upd --- hosts/intelnuc/system.nix | 54 +++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/hosts/intelnuc/system.nix b/hosts/intelnuc/system.nix index 633659e..cd2fa24 100644 --- a/hosts/intelnuc/system.nix +++ b/hosts/intelnuc/system.nix @@ -79,38 +79,54 @@ }; services.nginx.enable = true; - services.nginx.virtualHosts."grafana_first" = { + services.nginx.virtualHosts."grafana" = { forceSSL = false; listen = [{port = 80; addr="0.0.0.0"; ssl=false;}]; serverName = "graf1.local"; locations."/".extraConfig = '' proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_pass ${inputs.secrets.work.graf1}; + proxy_pass ${inputs.secrets.work.graf-url}; ''; locations."/api/live/ws".extraConfig = '' proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; - proxy_pass ${inputs.secrets.work.graf1}; - ''; - }; - services.nginx.virtualHosts."grafana_second" = { - forceSSL = false; - listen = [{port = 80; addr="0.0.0.0"; ssl=false;}]; - serverName = "graf2.local"; - locations."/".extraConfig = '' - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_pass ${inputs.secrets.work.graf2}; - ''; - locations."/api/live/ws".extraConfig = '' - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_pass ${inputs.secrets.work.graf2}; + proxy_pass ${inputs.secrets.work.graf-url}; ''; }; + # services.nginx.virtualHosts."grafana_first" = { + # forceSSL = false; + # listen = [{port = 80; addr="0.0.0.0"; ssl=false;}]; + # serverName = "graf1.local"; + # locations."/".extraConfig = '' + # proxy_set_header Host $host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_pass ${inputs.secrets.work.graf1}; + # ''; + # locations."/api/live/ws".extraConfig = '' + # proxy_http_version 1.1; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection "upgrade"; + # proxy_pass ${inputs.secrets.work.graf1}; + # ''; + # }; + # services.nginx.virtualHosts."grafana_second" = { + # forceSSL = false; + # listen = [{port = 80; addr="0.0.0.0"; ssl=false;}]; + # serverName = "graf2.local"; + # locations."/".extraConfig = '' + # proxy_set_header Host $host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_pass ${inputs.secrets.work.graf2}; + # ''; + # locations."/api/live/ws".extraConfig = '' + # proxy_http_version 1.1; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection "upgrade"; + # proxy_pass ${inputs.secrets.work.graf2}; + # ''; + # }; services.nginx.virtualHosts."kibana" = { forceSSL = false; listen = [{port = 80; addr="0.0.0.0"; ssl=false;}];