From cedf3fa4e69567bc79d27e4ea0ad9ccc0a110d54 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 20 Feb 2024 09:55:08 -0600 Subject: [PATCH] Try to fix podman-zwave ordering --- hosts/genesis/home-assistant.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/genesis/home-assistant.nix b/hosts/genesis/home-assistant.nix index df578cc..2dc35fb 100755 --- a/hosts/genesis/home-assistant.nix +++ b/hosts/genesis/home-assistant.nix @@ -73,6 +73,7 @@ in # I have ZWave devices. The easiest way to connect to them is the zwavejs2mqtt service running, so we spin up # its container and map the ZWave device into it containers.zwave = { + autoStart = false; # We will try to start it with udev.extraRules listed below, as this option starts it too quickly image = "zwavejs/zwave-js-ui:latest"; ports = [ "8091:8091" "3000:3000" ]; volumes = [ "/var/lib/zwave:/usr/src/app/store" ]; @@ -95,6 +96,10 @@ in }; }; + services.udev.extraRules = '' + SUBSYSTEM=="tty", KERNEL=="ttyACM0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="podman-zwave.service" + ''; + greg.proxies = { "smart.home".target = "http://127.0.0.1:8123/";