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;
|
||||
|
||||
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}";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue