diff --git a/modules/nixos/homeassistant/automations/default.nix b/modules/nixos/homeassistant/automations/default.nix index cb9484d..1ddfdb1 100644 --- a/modules/nixos/homeassistant/automations/default.nix +++ b/modules/nixos/homeassistant/automations/default.nix @@ -143,5 +143,11 @@ in config = { environment.etc."lightswitch-automations.yaml".text = lightswitchAutomations; + + systemd.tmpfiles.rules = [ + "d /var/lib/homeassistant/automations 0755 hass hass -" + "L+ /var/lib/hass/automations/lightswitches.yaml - - - - ${lightswitchAutomations}" + ]; + }; }