nixos-config/nixos/machines/pepe/hass.nix

20 lines
557 B
Nix
Raw Normal View History

2023-01-15 10:43:10 +01:00
{ config, lib, pkgs, ... }:
{
virtualisation.oci-containers = {
backend = "podman";
containers.homeassistant = {
2023-01-18 22:09:04 +01:00
volumes = [ "/var/lib/home-assistant:/config" ];
2023-01-15 10:43:10 +01:00
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
2023-01-18 22:09:04 +01:00
extraOptions = [ "--network=host" ];
2023-01-15 10:43:10 +01:00
};
};
2023-01-18 22:09:04 +01:00
backup.dirs = [ "/var/lib/home-assistant" ];
networking.firewall.allowedTCPPorts = [ 8123 ];
networking.firewall.allowedUDPPorts = [ 8123 ];
2023-01-15 10:43:10 +01:00
}