Updated python

This commit is contained in:
Jan-Bulthuis 2025-02-09 23:45:15 +01:00
parent ba6aec06a3
commit f32764b652
4 changed files with 11 additions and 11 deletions

View File

@ -6,6 +6,10 @@
}:
with lib;
let
packages = config.python.packages;
pythonPackage = pkgs.python3.withPackages packages;
in
{
options.python = {
enable = mkEnableOption "Python";
@ -22,14 +26,10 @@ with lib;
};
config = mkIf config.python.enable {
packages =
with pkgs;
let
packages = config.python.packages;
pythonPackage = python3.withPackages packages;
in
[
pythonPackage
];
packages = [
pythonPackage
];
env.PYTHONINTERPRETER = "${pythonPackage}/bin/python";
};
}

View File

@ -11,6 +11,5 @@ with lib;
};
config = mkIf config.cuda.enable {
};
}

View File

@ -12,11 +12,11 @@ with lib;
config = mkIf config.jupyter.enable {
python.enable = mkDefault true;
python.packages =
p: with p; [
jupyter
notebook
ipykernel
];
};
}

View File

@ -42,6 +42,7 @@ in
];
userSettings = {
"python.defaultInterpreterPath" = "\${env:PYTHONINTERPRETER}";
"[python]" = {
"editor.defaultFormatter" = "ms-python.black-formatter";
};