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; + ''; + }; + }; + }; }