nixos-config/machines/chungus/hass.nix
2025-03-25 17:25:36 +01:00

23 lines
623 B
Nix

{
config,
lib,
pkgs,
zerotierInterface,
...
}:
{
virtualisation.oci-containers = {
containers.homeassistant = {
volumes = [ "/srv2/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" ];
};
};
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 8123 ];
networking.firewall.interfaces.wg0.allowedUDPPorts = [ 8123 ];
networking.firewall.interfaces.${zerotierInterface}.allowedTCPPorts = [ 8123 ];
}