nixos/home-assistant: always add dependencies for default integrations
These are loaded unconditionally during bootstrap, and home-assistant will now fail to start, if these aren't provided.
This commit is contained in:
parent
ad719a4503
commit
055a8f709a
1 changed files with 40 additions and 1 deletions
|
@ -52,7 +52,7 @@ let
|
||||||
hasAttrByPath (splitString "." component) cfg.config
|
hasAttrByPath (splitString "." component) cfg.config
|
||||||
|| useComponentPlatform component
|
|| useComponentPlatform component
|
||||||
|| useExplicitComponent component
|
|| useExplicitComponent component
|
||||||
|| builtins.elem component cfg.extraComponents;
|
|| builtins.elem component (cfg.extraComponents ++ cfg.defaultIntegrations);
|
||||||
|
|
||||||
# Final list of components passed into the package to include required dependencies
|
# Final list of components passed into the package to include required dependencies
|
||||||
extraComponents = filter useComponent availableComponents;
|
extraComponents = filter useComponent availableComponents;
|
||||||
|
@ -103,6 +103,45 @@ in {
|
||||||
description = lib.mdDoc "The config directory, where your {file}`configuration.yaml` is located.";
|
description = lib.mdDoc "The config directory, where your {file}`configuration.yaml` is located.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defaultIntegrations = mkOption {
|
||||||
|
type = types.listOf (types.enum availableComponents);
|
||||||
|
# https://github.com/home-assistant/core/blob/dev/homeassistant/bootstrap.py#L109
|
||||||
|
default = [
|
||||||
|
"application_credentials"
|
||||||
|
"frontend"
|
||||||
|
"hardware"
|
||||||
|
"logger"
|
||||||
|
"network"
|
||||||
|
"system_health"
|
||||||
|
|
||||||
|
# key features
|
||||||
|
"automation"
|
||||||
|
"person"
|
||||||
|
"scene"
|
||||||
|
"script"
|
||||||
|
"tag"
|
||||||
|
"zone"
|
||||||
|
|
||||||
|
# built-in helpers
|
||||||
|
"counter"
|
||||||
|
"input_boolean"
|
||||||
|
"input_button"
|
||||||
|
"input_datetime"
|
||||||
|
"input_number"
|
||||||
|
"input_select"
|
||||||
|
"input_text"
|
||||||
|
"schedule"
|
||||||
|
"timer"
|
||||||
|
|
||||||
|
# non-supervisor
|
||||||
|
"backup"
|
||||||
|
];
|
||||||
|
readOnly = true;
|
||||||
|
description = ''
|
||||||
|
List of integrations set are always set up, unless in recovery mode.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraComponents = mkOption {
|
extraComponents = mkOption {
|
||||||
type = types.listOf (types.enum availableComponents);
|
type = types.listOf (types.enum availableComponents);
|
||||||
default = [
|
default = [
|
||||||
|
|
Loading…
Reference in a new issue