modules: add python options to specify the python environment

This commit is contained in:
Gaetan Lepage 2024-01-06 17:13:45 +01:00 committed by Gaétan Lepage
parent 96cdbc8177
commit 1ab5159acf
3 changed files with 36 additions and 0 deletions

View file

@ -1,6 +1,7 @@
{
lib,
config,
pkgs,
...
}:
with lib; let
@ -38,6 +39,24 @@ in {
description = "Extra packages to be made available to neovim";
};
python = {
package = mkOption {
type = types.package;
default = pkgs.python3;
description = "";
};
extraPythonPackages = mkOption {
type = with types; functionTo (listOf package);
default = p: [];
defaultText = literalExpression "p: with p; [ ]";
description = "Python packages to add to the `PYTHONPATH` of neovim.";
example = lib.literalExpression ''
p: [ p.numpy ]
'';
};
};
extraConfigLua = mkOption {
type = types.lines;
default = "";