From 3f7c2cc163f7bcdab44302fd2fca90f3410a8df7 Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Wed, 2 Aug 2023 12:12:24 +0200 Subject: [PATCH] add nginx to new home assistant --- utils/modules/home-assistant/new.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/utils/modules/home-assistant/new.nix b/utils/modules/home-assistant/new.nix index f519a99..f5b2022 100644 --- a/utils/modules/home-assistant/new.nix +++ b/utils/modules/home-assistant/new.nix @@ -26,5 +26,23 @@ ]; }; }; + + services.nginx.virtualHosts."home-assistant.cloonar.com" = { + forceSSL = true; + enableACME = true; + acmeRoot = null; + extraConfig = '' + proxy_buffering off; + ''; + locations."/".extraConfig = '' + proxy_pass http://127.0.0.1:8123; + proxy_set_header Host $host; + proxy_redirect http:// https://; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + ''; + }; }