fix deps not being installed

This commit is contained in:
Errol Sancaktar 2024-12-12 20:44:01 -07:00
parent c1239ad3ba
commit 5ea58675f6

View File

@ -1,4 +1,5 @@
{ config, lib, pkgs, ... }:
let
# Define the start script
service = "homeassistant";
@ -40,6 +41,20 @@ let
--device=/dev/zigbee:/dev/zigbee \
--ip=10.10.9.38 \
ghcr.io/home-assistant/home-assistant:$VERSION
# Wait for the container to be running
echo "Waiting for Home Assistant container to start..."
until podman inspect --format '{{.State.Status}}' $SERVICE | grep -q "running"; do
echo "Waiting for container $SERVICE to start..."
sleep 2
done
# Run your command after the container starts
echo "Home Assistant container started. Running post-start command."
# Replace the following line with the command you want to run
podman exec $SERVICE bash -c "for i in moonraker_api alexapy gasbuddy pyonwater hass_web_proxy_lib; do uv pip install \$i --index-strategy unsafe-first-match; done"
'';
in
{
@ -71,3 +86,4 @@ in
wantedBy = [ "multi-user.target" ];
};
}