service/home-assistant: fix redirect

This commit is contained in:
Felix Buehler 2023-11-20 21:48:33 +01:00
parent 05f2c244b6
commit 2807feac41

View file

@ -86,13 +86,23 @@ in
inherit (cfg) package;
config = {
default_config = { };
homeassistant = {
name = "Home";
inherit (cfg) latitude longitude elevation;
unit_system = "metric";
time_zone = cfg.timezone;
external_url = "https://automation.${domain}";
internal_url = "http://127.0.0.1:${cfg.port}";
};
http = {
server_port = cfg.port;
use_x_forwarded_for = true;
trusted_proxies = [
"127.0.0.1"
"::1"
];
};
http.server_port = cfg.port;
};
extraComponents = [
@ -131,13 +141,21 @@ in
{
subdomain = "automation";
inherit (cfg) port;
extraConfig = {
locations."/" = {
proxyWebsockets = true;
extraConfig = ''
proxy_buffering off;
'';
};
};
}
];
webapps.apps.home-assistant = {
dashboard = {
name = "Home-Automation";
category = "Infra";
category = "infra";
icon = "house-signal";
url = "https://automation.${domain}";
};