diff --git a/nixos/modules/services/misc/home-assistant.nix b/nixos/modules/services/misc/home-assistant.nix index 31b6afb499e..0c10b29a639 100644 --- a/nixos/modules/services/misc/home-assistant.nix +++ b/nixos/modules/services/misc/home-assistant.nix @@ -50,10 +50,15 @@ let # List of components used in config extraComponents = filter useComponent availableComponents; - package = if (cfg.autoExtraComponents && cfg.config != null) + testedPackage = if (cfg.autoExtraComponents && cfg.config != null) then (cfg.package.override { inherit extraComponents; }) else cfg.package; + # overridePythonAttrs has to be applied after override + package = testedPackage.overridePythonAttrs (oldAttrs: { + doCheck = false; + }); + # If you are changing this, please update the description in applyDefaultConfig defaultConfig = { homeassistant.time_zone = config.time.timeZone; @@ -183,13 +188,9 @@ in { }; package = mkOption { - default = pkgs.home-assistant.overridePythonAttrs (oldAttrs: { - doCheck = false; - }); + default = pkgs.home-assistant; defaultText = literalExample '' - pkgs.home-assistant.overridePythonAttrs (oldAttrs: { - doCheck = false; - }) + pkgs.home-assistant ''; type = types.package; example = literalExample '' @@ -198,10 +199,12 @@ in { } ''; description = '' - Home Assistant package to use. By default the tests are disabled, as they take a considerable amout of time to complete. + Home Assistant package to use. Tests are automatically disabled, as they take a considerable amout of time to complete. Override extraPackages or extraComponents in order to add additional dependencies. If you specify and do not set to false, overriding extraComponents will have no effect. + Avoid home-assistant.overridePythonAttrs if you use + autoExtraComponents. ''; };