{config, ...}: let port = 8123; inherit (import ../../lib) restic; influxPort = 9100; volumeName = "home-assistant.bak"; in { networking.firewall.allowedTCPPorts = [port influxPort]; services.nginx.virtualHosts."home.kmein.r" = { locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; }; }; services.restic.backups.niveum = { initialize = true; inherit (restic) repository; timerConfig = { OnCalendar = "daily"; RandomizedDelaySec = "1h"; }; passwordFile = config.age.secrets.restic.path; paths = [ "/var/lib/containers/storage/volumes/${volumeName}" ]; }; virtualisation.oci-containers = { backend = "podman"; containers.homeassistant = { volumes = ["${volumeName}:/config"]; environment.TZ = "Europe/Berlin"; image = "ghcr.io/home-assistant/home-assistant:stable"; extraOptions = [ "--network=host" "--device=/dev/ttyACM0:/dev/ttyACM0" # Example, change this to match your own hardware ]; }; }; }