about summary refs log tree commit diff
path: root/nixos/modules/services/home-automation/home-assistant.nix
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2023-04-06 07:56:47 -0700
committerGitHub <noreply@github.com>2023-04-06 07:56:47 -0700
commit2b81862da7833337c8c2f647994f375716ac1725 (patch)
tree5351e550ac33fc2a6cac95fdcd86870f97a2eb52 /nixos/modules/services/home-automation/home-assistant.nix
parentab73fe13705026cda6997ec6a71ddd6e4dc618cf (diff)
parent94b402045d8ff363f394bfa27b10755b90e6b92a (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.nix5
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