diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-01-30 03:46:41 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-02-15 23:41:49 +0100 |
commit | 13faa004b65c15a5a687db38943eb34347e20479 (patch) | |
tree | ba9b6c53ebccc2fe48f78dd4ee29d21e14a3f917 /nixos/modules/services/home-automation/home-assistant.nix | |
parent | 4b47eaee4ddabffc96a0f368a09670c46c93945f (diff) |
nixos/home-assistant: add extraPackages option
Diffstat (limited to 'nixos/modules/services/home-automation/home-assistant.nix')
-rw-r--r-- | nixos/modules/services/home-automation/home-assistant.nix | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/nixos/modules/services/home-automation/home-assistant.nix b/nixos/modules/services/home-automation/home-assistant.nix index 59a8868996980..eb70cf4c9e298 100644 --- a/nixos/modules/services/home-automation/home-assistant.nix +++ b/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; |