diff options
author | Robert Schütz <nix@dotlambda.de> | 2023-04-06 07:56:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 07:56:47 -0700 |
commit | 2b81862da7833337c8c2f647994f375716ac1725 (patch) | |
tree | 5351e550ac33fc2a6cac95fdcd86870f97a2eb52 /nixos/modules/services/home-automation/home-assistant.nix | |
parent | ab73fe13705026cda6997ec6a71ddd6e4dc618cf (diff) | |
parent | 94b402045d8ff363f394bfa27b10755b90e6b92a (diff) |
Merge pull request #224908 from SuperSandro2000/home-assistant-drv
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 b91ad368f4beb..ac905a274af28 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 |