aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/nixos/modules/services/misc/home-assistant.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/nixos/modules/services/misc/home-assistant.nix')
-rw-r--r--infra/libkookie/nixpkgs/nixos/modules/services/misc/home-assistant.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/infra/libkookie/nixpkgs/nixos/modules/services/misc/home-assistant.nix b/infra/libkookie/nixpkgs/nixos/modules/services/misc/home-assistant.nix
index 0477254e7c18..1f2e13f37325 100644
--- a/infra/libkookie/nixpkgs/nixos/modules/services/misc/home-assistant.nix
+++ b/infra/libkookie/nixpkgs/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;