nixos/home-assistant: fix infinite recursion when derivations are used in config

This commit is contained in:
Sandro Jäckel 2023-04-06 01:26:24 +02:00
parent dc464b6536
commit 94b402045d
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -35,7 +35,10 @@ let
# ... # ...
# } ]; # } ];
usedPlatforms = config: 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 optional (config ? platform) config.platform
++ concatMap usedPlatforms (attrValues config) ++ concatMap usedPlatforms (attrValues config)
else if isList config then else if isList config then