diff --git a/jasmine/services/homeassistant.nix b/jasmine/services/homeassistant.nix index e2ea5c372169f2100ef0e8111d8588dfd4ce9a30..eaf9461fd3b11bf30e511f366c474728bcd68e11 100644 --- a/jasmine/services/homeassistant.nix +++ b/jasmine/services/homeassistant.nix @@ -1,8 +1,6 @@ -{ lib, pkgs, ... }: +{ lib, ... }: let enable = true; - version = "2026.9"; - image = "ghcr.io/home-assistant/home-assistant:${version}"; in lib.mkIf enable { virtualisation.oci-containers = { @@ -10,7 +8,7 @@ backend = "podman"; containers.homeassistant = { volumes = [ "home-assistant:/config" ]; environment.TZ = "America/Chicago"; - inherit image; + image = "ghcr.io/home-assistant/home-assistant:stable"; extraOptions = [ "--network=host" "--device=/dev/ttyUSB0:/dev/ttyUSB0" @@ -21,30 +19,4 @@ networking.firewall.allowedTCPPorts = [ 4001 8123 ]; - - systemd = { - services.homeassistant-update = { - description = "Pull homeassistant image and restart the container if it changed"; - after = [ "network-online.target" ]; - wants = [ "network-online.target" ]; - serviceConfig.Type = "oneshot"; - script = '' - old=$(${pkgs.podman}/bin/podman image inspect --format '{{.Id}}' ${image} 2>/dev/null || true) - ${pkgs.podman}/bin/podman pull ${image} - new=$(${pkgs.podman}/bin/podman image inspect --format '{{.Id}}' ${image}) - if [ "$old" != "$new" ]; then - systemctl restart podman-homeassistant.service - fi - ''; - }; - - timers.homeassistant-update = { - description = "Nightly homeassistant image pull"; - wantedBy = [ "timers.target" ]; - timerConfig = { - OnCalendar = "*-*-* 00:00:00"; - Persistent = true; - }; - }; - }; }