From ee26c4437d8b1a238976325fd9147a74a4f03701 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sun, 18 Aug 2024 17:51:19 -0700 Subject: [PATCH] added tailscale entries for home-assistant --- hosts/Alaska/modules/dns.nix | 5 +++++ hosts/Alaska/modules/home-assistant.nix | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/hosts/Alaska/modules/dns.nix b/hosts/Alaska/modules/dns.nix index 1707cd1..9d54357 100644 --- a/hosts/Alaska/modules/dns.nix +++ b/hosts/Alaska/modules/dns.nix @@ -24,4 +24,9 @@ type = "A"; value = "100.64.0.1"; } + { + name = "home-assistant.nickiel.net"; + type = "A"; + value = "100.64.0.1"; + } ] diff --git a/hosts/Alaska/modules/home-assistant.nix b/hosts/Alaska/modules/home-assistant.nix index 3b48d25..f5c23e8 100644 --- a/hosts/Alaska/modules/home-assistant.nix +++ b/hosts/Alaska/modules/home-assistant.nix @@ -18,4 +18,18 @@ }; }; + + services.nginx.virtualHosts = { + "home-assistant.nickiel.net" = { + locations."/" = { + proxyPass = "http://127.0.0.1:8123"; + proxyWebsockets = true; + extraConfig = '' + allow 100.64.0.0/16; + allow 127.0.0.1; + deny all; + ''; + }; + }; + }; }