From 68b0e6dda10433b39f4a5997cac91c123dd77699 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Wed, 18 Jan 2023 22:09:04 +0100 Subject: [PATCH] open hass to local network --- nixos/machines/pepe/hass.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos/machines/pepe/hass.nix b/nixos/machines/pepe/hass.nix index d3ab27c..df28c65 100644 --- a/nixos/machines/pepe/hass.nix +++ b/nixos/machines/pepe/hass.nix @@ -4,13 +4,16 @@ virtualisation.oci-containers = { backend = "podman"; containers.homeassistant = { - volumes = [ "home-assistant:/config" ]; + volumes = [ "/var/lib/home-assistant:/config" ]; environment.TZ = "Europe/Berlin"; image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated - extraOptions = [ - "--network=host" - ]; + extraOptions = [ "--network=host" ]; }; }; + backup.dirs = [ "/var/lib/home-assistant" ]; + + networking.firewall.allowedTCPPorts = [ 8123 ]; + networking.firewall.allowedUDPPorts = [ 8123 ]; + }