home-assistant: add allowlist_external_dirs to systemd unit ReadWritePaths

wip/yesman
Matt Votava 4 years ago
parent 54e2bb0bf9
commit 746efadcce
  1. 6
      nixos/modules/services/misc/home-assistant.nix

@ -245,7 +245,11 @@ in {
Group = "hass";
Restart = "on-failure";
ProtectSystem = "strict";
ReadWritePaths = "${cfg.configDir}";
ReadWritePaths = let
cfgPath = [ "config" "homeassistant" "allowlist_external_dirs" ];
value = attrByPath cfgPath [] cfg;
allowPaths = if isList value then value else singleton value;
in [ "${cfg.configDir}" ] ++ allowPaths;
KillSignal = "SIGINT";
PrivateTmp = true;
RemoveIPC = true;

Loading…
Cancel
Save