nixos/home-assistant: add extraPackages option

main
Martin Weinelt 2 years ago
parent 4b47eaee4d
commit 13faa004b6
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
  1. 22
      nixos/modules/services/home-automation/home-assistant.nix

@ -59,8 +59,8 @@ let
# Respect overrides that already exist in the passed package and
# concat it with values passed via the module.
extraComponents = oldArgs.extraComponents ++ extraComponents;
extraPackages = ps: (oldArgs.extraPackages ps) ++ (cfg.extraPackages ps);
}));
in {
imports = [
# Migrations in NixOS 22.05
@ -110,6 +110,26 @@ in {
'';
};
extraPackages = mkOption {
type = types.functionTo (types.listOf types.package);
default = _: [];
defaultText = literalExpression ''
python3Packages: with python3Packages; [];
'';
example = literalExpression ''
python3Packages: with python3Packages; [
# postgresql support
psycopg2
];
'';
description = ''
List of packages to add to propagatedBuildInputs.
A popular example is <package>python3Packages.psycopg2</package>
for PostgreSQL support in the recorder component.
'';
};
config = mkOption {
type = types.submodule {
freeformType = format.type;

Loading…
Cancel
Save