homeassistant: allow remote connection via tailscale tunnel
This commit is contained in:
parent
e8c4f0807f
commit
b30b4a91d2
|
@ -112,6 +112,26 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
configWritable = true;
|
||||
config = {
|
||||
homeassistant = {
|
||||
name = "Heidelberg";
|
||||
temperature_unit = "C";
|
||||
unit_system = "metric";
|
||||
};
|
||||
|
||||
http = {
|
||||
use_x_forwarded_for = true;
|
||||
trusted_proxies = [
|
||||
"100.86.250.97"
|
||||
];
|
||||
};
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
# Pi specific stuff
|
||||
raspberry-pi-nix = {
|
||||
board = "bcm2712";
|
||||
|
|
|
@ -68,6 +68,10 @@ in
|
|||
|
||||
locations."/" = {
|
||||
# tailscale ip
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
proxyPass = "http://100.86.23.74:8123";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue