open hass to local network

This commit is contained in:
Ingolf Wagner 2023-01-18 22:09:04 +01:00
parent 4add12c084
commit 68b0e6dda1
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -4,13 +4,16 @@
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers.homeassistant = { containers.homeassistant = {
volumes = [ "home-assistant:/config" ]; volumes = [ "/var/lib/home-assistant:/config" ];
environment.TZ = "Europe/Berlin"; 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 image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated
extraOptions = [ extraOptions = [ "--network=host" ];
"--network=host"
];
}; };
}; };
backup.dirs = [ "/var/lib/home-assistant" ];
networking.firewall.allowedTCPPorts = [ 8123 ];
networking.firewall.allowedUDPPorts = [ 8123 ];
} }