mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
service/home-assistant: fix redirect
This commit is contained in:
parent
05f2c244b6
commit
2807feac41
1 changed files with 20 additions and 2 deletions
|
@ -86,13 +86,23 @@ in
|
||||||
inherit (cfg) package;
|
inherit (cfg) package;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
default_config = { };
|
||||||
homeassistant = {
|
homeassistant = {
|
||||||
name = "Home";
|
name = "Home";
|
||||||
inherit (cfg) latitude longitude elevation;
|
inherit (cfg) latitude longitude elevation;
|
||||||
unit_system = "metric";
|
unit_system = "metric";
|
||||||
time_zone = cfg.timezone;
|
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 = [
|
extraComponents = [
|
||||||
|
@ -131,13 +141,21 @@ in
|
||||||
{
|
{
|
||||||
subdomain = "automation";
|
subdomain = "automation";
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
|
extraConfig = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyWebsockets = true;
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_buffering off;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
webapps.apps.home-assistant = {
|
webapps.apps.home-assistant = {
|
||||||
dashboard = {
|
dashboard = {
|
||||||
name = "Home-Automation";
|
name = "Home-Automation";
|
||||||
category = "Infra";
|
category = "infra";
|
||||||
icon = "house-signal";
|
icon = "house-signal";
|
||||||
url = "https://automation.${domain}";
|
url = "https://automation.${domain}";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue