{ config, pkgs, ... }: { homeassistant = { enable = true; extraComponents = [ # Components required to complete the onboarding "analytics" "google_translate" "met" "radio_browser" "shopping_list" # Recommended for fast zlib compression # https://www.home-assistant.io/integrations/isal "isal" ]; customComponents = with pkgs.home-assistant-custom-components; [ auth-header # bambulab # ge_home # mail_and_packages # overseerr # petlibro # subaru # vesync # wyze-api ]; # use postgresql instead of sqlite extraPackages = ps: with ps; [ psycopg2 ]; config.recorder.db_url = "postgresql://@/hass"; config = { "automation ui" = "!include automations.yaml"; "scene ui" = "!include scenes.yaml"; "script ui" = "!include scripts.yaml"; # https://www.home-assistant.io/integrations/ota_updater/ zha.zigpy_config.ota.z2m_remote_index = "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/index.json"; }; }; # https://www.home-assistant.io/integrations/automation/ systemd.tmpfiles.rules = [ "f ${config.services.home-assistant.configDir}/automations.yaml 0755 hass hass" ]; services.postgresql = { enable = true; dataDir = "/media/nas/ssd/nix-apps/postgresql"; ensureDatabases = [ "hass" ]; ensureUsers = [{ name = "hass"; ensureDBOwnership = true; }]; }; }