1
0
Fork 0

Services: get Home Assistant working, then promptly disable it (couldn't find any devices :\ )

This commit is contained in:
Aires 2024-09-07 19:07:50 -04:00
parent 121d996287
commit 8c5f2e1656
2 changed files with 19 additions and 9 deletions

View file

@ -21,12 +21,13 @@ let
};
# List of subdomains to add to the TLS certificate
subdomains = [
config.secrets.services.deluge.url
config.secrets.services.forgejo.url
config.secrets.services.gremlin-lab.url
config.secrets.services.jellyfin.url
config.secrets.services.netdata.url
subdomains = with config.secrets.services; [
deluge.url
forgejo.url
gremlin-lab.url
home-assistant.url
jellyfin.url
netdata.url
];
in
{

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.aux.system.services.home-assistant;
@ -32,13 +32,14 @@ in
config = lib.mkIf cfg.enable {
services = {
home-assistant = {
enable = true;
# opt-out from declarative configuration management
config = null;
lovelaceConfig = null;
# configure the path to your config directory
configDir = cfg.home;
# specify list of components required by your configuration
extraComponents = [
"default_config"
"esphome"
"eufy"
"govee_light_local"
@ -46,12 +47,20 @@ in
"radio_browser"
"tplink"
];
extraPackages = python3Packages: with python3Packages; [
numpy
];
config.http = {
server_host = "::1";
trusted_proxies = [ "::1" ];
use_x_forwarded_for = true;
};
};
nginx.virtualHosts."${cfg.url}" = {
useACMEHost = cfg.domain;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8123";
proxyPass = "http://[::1]:8123";
proxyWebsockets = true;
extraConfig = ''
# Security / XSS Mitigation Headers