From c767171fad51d91e031c6cd95078037bcba8ce2a Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sat, 6 Jan 2024 10:29:32 +0000 Subject: [PATCH] Revert "Use home-assistant container instead" This reverts commit 137bee5f59d47cdd0f6ee1aaaae60dd6bf6864c2. --- hosts/pi/default.nix | 47 +++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/hosts/pi/default.nix b/hosts/pi/default.nix index cb3ecc5..d016360 100644 --- a/hosts/pi/default.nix +++ b/hosts/pi/default.nix @@ -88,16 +88,41 @@ pulse.enable = true; }; - virtualisation.oci-containers = { - backend = "podman"; - containers.homeassistant = { - volumes = [ "home-assistant:/config" ]; - environment.TZ = config.time.timeZone; - image = "ghcr.io/home-assistant/home-assistant:stable"; - extraOptions = [ - "--network=host" - "--device=/dev/ttyUSB0:/dev/ttyUSB0" - ]; + services.home-assistant = { + enable = true; + extraComponents = [ + "api" + "alert" + "auth" + "backup" + "command_line" + "default_config" + "homekit_controller" + "homekit" + "http" + "icloud" + "jellyfin" + "metoffice" + "mqtt" + "onkyo" + "ping" + "proximity" + "radio_browser" + "scrape" + "sensor" + ]; + config = { + default_config = {}; + backup = {}; + homeassistant = { + name = "Home"; + unit_system = "metric"; + temperature_unit = "C"; + }; + mqtt = {}; + recorder = { + purge_keep_days = 365; + }; }; }; @@ -122,7 +147,7 @@ enable = true; dataDir = "/var/lib/zigbee2mqtt"; settings = { - homeassistant = true; + homeassistant = config.services.home-assistant.enable; frontend = true; device_options = { retain = true;