@@ -245,7 +245,11 @@ in {
245245 Group = "hass";
246246 Restart = "on-failure";
247247 ProtectSystem = "strict";
248− ReadWritePaths = "${cfg.configDir}";
248+ ReadWritePaths = let
249+ cfgPath = [ "config" "homeassistant" "allowlist_external_dirs" ];
250+ value = attrByPath cfgPath [] cfg;
251+ allowPaths = if isList value then value else singleton value;
252+ in [ "${cfg.configDir}" ] ++ allowPaths;
249253 KillSignal = "SIGINT";
250254 PrivateTmp = true;
251255 RemoveIPC = true;