Files
dotfiles/systems/brain/services/home_assistant.nix
T
Richie 107b4f24d1
treefmt / nix fmt (pull_request) Successful in 6s
build_systems / build-brain (pull_request) Failing after 31s
pytest / pytest (pull_request) Successful in 29s
test ebook search / test-ebook-search (pull_request) Successful in 35s
build_systems / build-bob (pull_request) Successful in 48s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m2s
build_systems / build-jeeves (pull_request) Successful in 2m32s
fix(home_assistant): update firewall settings and remove redundant http server port
2026-08-18 21:24:18 -04:00

92 lines
2.6 KiB
Nix

{ pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 8123 ];
users = {
users.hass = {
isSystemUser = true;
group = "hass";
};
groups.hass = { };
};
services = {
home-assistant = {
enable = true;
config = {
homeassistant = {
time_zone = "America/New_York";
unit_system = "us_customary";
temperature_unit = "F";
packages = {
victron_modbuss = "!include ${./home_assistant/victron_modbuss.yaml}";
battery_sensors = "!include ${./home_assistant/battery_sensors.yaml}";
gps_location = "!include ${./home_assistant/gps_location.yaml}";
heater = "!include ${./home_assistant/heater.yaml}";
van_weather = "!include ${./home_assistant/van_weather_template.yaml}";
};
};
recorder = {
db_url = "postgresql://@/hass";
auto_purge = true;
purge_keep_days = 3650;
db_retry_wait = 15;
};
assist_pipeline = { };
backup = { };
bluetooth = { };
config = { };
dhcp = { };
energy = { };
history = { };
homeassistant_alerts = { };
image_upload = { };
logbook = { };
media_source = { };
mobile_app = { };
ssdp = { };
sun = { };
webhook = { };
cloud = { };
zeroconf = { };
automation = "!include automations.yaml";
script = "!include scripts.yaml";
scene = "!include scenes.yaml";
group = "!include groups.yaml";
};
extraPackages =
python3Packages: with python3Packages; [
aioesphomeapi # for esphome
aiounifi # for ubiquiti integration
bleak-esphome # for esphome
esphome-dashboard-api # for esphome
forecast-solar # for solar forecast
gtts # not sure what wants this
ical # for todo
jellyfin-apiclient-python # for jellyfin
paho-mqtt # for mqtt
psycopg2 # for postgresql
py-improv-ble-client # for esphome
pymodbus # for modbus
pyopenweathermap # for weather
pymetno # for met.no weather
uiprotect # for ubiquiti integration
unifi-discovery # for ubiquiti integration
jsonpath # for rest sensors
typedmonarchmoney # for monarch
];
extraComponents = [ "isal" ];
customComponents = with pkgs.home-assistant-custom-components; [
garmin_connect
pirate-weather
];
};
esphome = {
enable = true;
openFirewall = true;
address = "192.168.90.35";
};
};
}