From 8b9c6a1f1724b439cd7c96695b1b9157106ee0cb Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Wed, 22 Feb 2023 13:09:11 +0100 Subject: [PATCH] Create home-assistant.yori.cc --- nixos/machines/frumar/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nixos/machines/frumar/default.nix b/nixos/machines/frumar/default.nix index d88acc2..5788cb9 100644 --- a/nixos/machines/frumar/default.nix +++ b/nixos/machines/frumar/default.nix @@ -60,6 +60,14 @@ ''; }; }; + virtualHosts."home-assistant.yori.cc" = { + onlySSL = true; + inherit sslCertificate sslCertificateKey; + locations."/" = { + proxyPass = "http://[::1]:8123"; + proxyWebsockets = true; + }; + }; virtualHosts."frumar.yori.cc" = { enableACME = lib.mkForce false; forceSSL = true; @@ -200,6 +208,10 @@ unit_system = "metric"; time_zone = "Europe/Amsterdam"; }; + http = { + use_x_forwarded_for = true; + trusted_proxies = [ "::1" ]; + }; }; }; age.secrets = {