diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index c58a31539ed8..6ffe314d4574 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/nixos/modules/services/home-automation/home-assistant.nix @@ -192,7 +192,12 @@ in { }; customComponents = mkOption { - type = types.listOf types.package; + type = types.listOf ( + types.addCheck types.package (p: p.isHomeAssistantComponent or false) // { + name = "home-assistant-component"; + description = "package that is a Home Assistant component"; + } + ); default = []; example = literalExpression '' with pkgs.home-assistant-custom-components; [ diff --git a/pkgs/servers/home-assistant/build-custom-component/default.nix b/pkgs/servers/home-assistant/build-custom-component/default.nix index 17677e99d125..7f45ac6bcb00 100644 --- a/pkgs/servers/home-assistant/build-custom-component/default.nix +++ b/pkgs/servers/home-assistant/build-custom-component/default.nix @@ -39,5 +39,9 @@ home-assistant.python.pkgs.buildPythonPackage ( packaging ] ++ (args.nativeCheckInputs or []); - } // builtins.removeAttrs args [ "nativeCheckInputs" ] + passthru = { + isHomeAssistantComponent = true; + } // args.passthru or { }; + + } // builtins.removeAttrs args [ "nativeCheckInputs" "passthru" ] )