From 44dd157b6fdd1923e5471e691403ead6d989a608 Mon Sep 17 00:00:00 2001 From: Stefan Wiehler Date: Sat, 19 Apr 2025 15:15:25 +0200 Subject: [PATCH] nixos/home-assistant: add custom components to used components query There should be no need to add custom components without YAML configuration to extraComponents for systemd service modifications to become effective (e.g. serial access). --- nixos/modules/services/home-automation/home-assistant.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index ad98e75cfbea..2887e5754173 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -20,6 +20,7 @@ let filter filterAttrsRecursive flatten + getAttr hasAttrByPath isAttrs isDerivation @@ -111,7 +112,9 @@ let hasAttrByPath (splitString "." component) cfg.config || useComponentPlatform component || useExplicitComponent component - || builtins.elem component (cfg.extraComponents ++ cfg.defaultIntegrations); + || builtins.elem component ( + cfg.extraComponents ++ cfg.defaultIntegrations ++ map (getAttr "domain") cfg.customComponents + ); # Final list of components passed into the package to include required dependencies extraComponents = filter useComponent availableComponents;