diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2023-04-06 01:26:24 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2023-04-06 01:26:24 +0200 |
commit | 94b402045d8ff363f394bfa27b10755b90e6b92a (patch) | |
tree | 57427eb3ceff622be90a8fa2ede9acbb177ab126 /nixos/modules/services/home-automation/home-assistant.nix | |
parent | dc464b65369640e9aff0815d70134af1f266cda5 (diff) |
nixos/home-assistant: fix infinite recursion when derivations are used in config
Diffstat (limited to 'nixos/modules/services/home-automation/home-assistant.nix')
-rw-r--r-- | nixos/modules/services/home-automation/home-assistant.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index cea8a2b14cc22..1e695abb7cedd 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -35,7 +35,10 @@ let # ... # } ]; usedPlatforms = config: - if isAttrs config then + # don't recurse into derivations possibly creating an infinite recursion + if isDerivation config then + [ ] + else if isAttrs config then optional (config ? platform) config.platform ++ concatMap usedPlatforms (attrValues config) else if isList config then |