config upd

This commit is contained in:
mjallen18
2025-07-16 12:46:52 -05:00
parent 6c3de9beb4
commit cdcd102d8c
7 changed files with 213 additions and 32 deletions

View File

@@ -24,14 +24,44 @@ in
services.home-assistant = {
enable = true;
openFirewall = true;
configDir = "/var/lib/homeassistant";
configWritable = true; # todo
extraComponents = [
# Components required to complete the onboarding
"adguard"
"apple_tv"
"analytics"
"bluetooth"
"bluetooth_adapters"
"bluetooth_le_tracker"
"bluetooth_tracker"
"brother"
"caldav"
"calendar"
"cloudflare"
"co2signal"
"color_extractor"
"holiday"
"jellyfin"
"music_assistant"
"nut"
"nextcloud"
"nws"
"ollama"
"onedrive"
"ping"
"samsungtv"
"season"
"simplefin"
"smartthings"
"upnp"
"workday"
"wyoming"
"google_translate"
"met"
"radio_browser"
"shopping_list"
"esphome"
# Recommended for fast zlib compression
# https://www.home-assistant.io/integrations/isal
"isal"
@@ -147,6 +177,18 @@ in
python-roborock
python-steam
apple-weatherkit
samsungctl
samsungtvws
aiohomekit
icmplib
aioelectricitymaps
wyoming
pysmartthings
wakeonlan
ephem
];
config = {
@@ -160,15 +202,17 @@ in
themes = "!include_dir_merge_named themes";
};
"automation ui" = "!include /etc/nixos/hosts/homeassistant/automations.yaml";
"scene ui" = "!include /etc/nixos/hosts/homeassistant/scenes.yaml";
"script ui" = "!include /etc/nixos/hosts/homeassistant/scripts.yaml";
"automation ui" = "!include automations.yaml";
"scene ui" = "!include scenes.yaml";
"script ui" = "!include scripts.yaml";
http = {
use_x_forwarded_for = true;
trusted_proxies = [
"172.30.33.0/24"
"10.0.1.3"
"10.0.1.4"
"10.0.4.2"
"10.0.1.18"
"10.0.1.0/24"
];
};
@@ -195,13 +239,6 @@ in
# This bypasses the component validation and places it directly in HA's data directory
system.activationScripts.installCustomComponents = ''
mkdir -p ${config.services.home-assistant.configDir}/custom_components
ln -sf /etc/nixos/hosts/homeassistant/automations.yaml ${config.services.home-assistant.configDir}/automations.yaml
ln -sf /etc/nixos/hosts/homeassistant/scenes.yaml ${config.services.home-assistant.configDir}/scenes.yaml
ln -sf /etc/nixos/hosts/homeassistant/scripts.yaml ${config.services.home-assistant.configDir}/scripts.yaml
chown -R hass:hass ${config.services.home-assistant.configDir}
chmod -R 750 ${config.services.home-assistant.configDir}
'';