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 # List of subdomains to add to the TLS certificate
subdomains = [ subdomains = with config.secrets.services; [
config.secrets.services.deluge.url deluge.url
config.secrets.services.forgejo.url forgejo.url
config.secrets.services.gremlin-lab.url gremlin-lab.url
config.secrets.services.jellyfin.url home-assistant.url
config.secrets.services.netdata.url jellyfin.url
netdata.url
]; ];
in in
{ {

View file

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