@ -49,14 +49,17 @@ let
useComponent = component :
hasAttrByPath ( splitString " . " component ) cfg . config
|| useComponentPlatform component
|| useExplicitComponent component ;
|| useExplicitComponent component
|| builtins . elem component cfg . extraComponents ;
# Final list of components passed into the package to include required dependencies
extraComponents = filter useComponent availableComponents ;
package = ( cfg . package . override {
inherit extraComponents ;
} ) ;
package = ( cfg . package . override ( oldArgs : {
# Respect overrides that already exist in the passed package and
# concat it with values passed via the module.
extraComponents = oldArgs . extraComponents ++ extraComponents ;
} ) ) ;
in {
imports = [
@ -82,6 +85,31 @@ in {
description = " T h e c o n f i g d i r e c t o r y , w h e r e y o u r < f i l e n a m e > c o n f i g u r a t i o n . y a m l < / f i l e n a m e > i s l o c a t e d . " ;
} ;
extraComponents = mkOption {
type = types . listOf ( types . enum availableComponents ) ;
default = [
# List of components required to complete the onboarding
" d e f a u l t _ c o n f i g "
" m e t "
" e s p h o m e "
] ;
example = literalExpression ''
[
" a n a l y t i c s "
" d e f a u l t _ c o n f i g "
" e s p h o m e "
" m y "
" s h o p p i n g _ l i s t "
" w l e d "
]
'' ;
description = ''
List of < link xlink:href= " h t t p s : / / w w w . h o m e - a s s i s t a n t . i o / i n t e g r a t i o n s / " > components < /link > that have their dependencies included in the package .
The component name can be found in the URL , for example <literal> https://www.home-assistant.io/integrations/ffmpeg/ < /literal > would map to <literal> ffmpeg < /literal > .
'' ;
} ;
config = mkOption {
type = types . submodule {
freeformType = format . type ;