diff --git a/modules/environments/home-assistant/default.nix b/modules/environments/home-assistant/default.nix index 3a849cf..a9012af 100644 --- a/modules/environments/home-assistant/default.nix +++ b/modules/environments/home-assistant/default.nix @@ -41,8 +41,19 @@ in unit_system = "metric"; }; mobile_app = {}; + automation = "!include automations.yaml"; + script = "!include scripts.yaml"; + scene = "!include scenes.yaml"; }; + # `!include` targets must exist or HA fails at startup. Create them empty + # so HA's UI editor can write to them; `f` only acts if the file is absent. + systemd.tmpfiles.rules = [ + "f /var/lib/hass/automations.yaml 0644 hass hass - []" + "f /var/lib/hass/scripts.yaml 0644 hass hass - {}" + "f /var/lib/hass/scenes.yaml 0644 hass hass - []" + ]; + services.openthread-border-router = { enable = true; package = pkgs.unstable.openthread-border-router;