diff --git a/modules/services/home-assistant.nix b/modules/services/home-assistant.nix index d978f91..e5d1991 100644 --- a/modules/services/home-assistant.nix +++ b/modules/services/home-assistant.nix @@ -1,16 +1,15 @@ { - services.home-assistant = { - enable = true; - extraComponents = [ - # Components required to complete the onboarding - "esphome" - "met" - "radio_browser" - ]; - config = { - # Includes dependencies for a basic setup - # https://www.home-assistant.io/integrations/default_config/ - default_config = { }; + networking.firewall.allowedTCPPorts = [ 8123 ]; + virtualisation.oci-containers = { + backend = "docker"; + containers.homeassistant = { + volumes = [ "home-assistant:/config" ]; + environment.TZ = "Europe/Amsterdam"; + image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated + extraOptions = [ + "--network=host" + # "--device=/dev/ttyACM0:/dev/ttyACM0" # Example, change this to match your own hardware + ]; }; }; }