mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2025-02-22 00:32:16 -08:00
Proxied home-assistant and added SSL
This commit is contained in:
parent
66172fc546
commit
5da4a5c8ea
1 changed files with 12 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
||||||
{
|
{
|
||||||
services.home-assistant = {
|
services.home-assistant = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = false;
|
||||||
|
|
||||||
# List extraComponents here to be installed. The names can be found here:
|
# List extraComponents here to be installed. The names can be found here:
|
||||||
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/home-assistant/component-packages.nix
|
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/home-assistant/component-packages.nix
|
||||||
|
@ -24,12 +24,23 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
http = {
|
||||||
|
server_port = 8123;
|
||||||
|
trusted_proxies = [ "127.0.0.1" ];
|
||||||
|
use_x_forwarded_for = true;
|
||||||
|
};
|
||||||
|
homeassistant = {
|
||||||
|
name = "Alaska";
|
||||||
|
temperature_unit = "F";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
"home-assistant.nickiel.net" = {
|
"home-assistant.nickiel.net" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:8123";
|
proxyPass = "http://127.0.0.1:8123";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue