Updated python
This commit is contained in:
parent
ba6aec06a3
commit
f32764b652
|
@ -6,6 +6,10 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
let
|
||||||
|
packages = config.python.packages;
|
||||||
|
pythonPackage = pkgs.python3.withPackages packages;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options.python = {
|
options.python = {
|
||||||
enable = mkEnableOption "Python";
|
enable = mkEnableOption "Python";
|
||||||
|
@ -22,14 +26,10 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.python.enable {
|
config = mkIf config.python.enable {
|
||||||
packages =
|
packages = [
|
||||||
with pkgs;
|
|
||||||
let
|
|
||||||
packages = config.python.packages;
|
|
||||||
pythonPackage = python3.withPackages packages;
|
|
||||||
in
|
|
||||||
[
|
|
||||||
pythonPackage
|
pythonPackage
|
||||||
];
|
];
|
||||||
|
|
||||||
|
env.PYTHONINTERPRETER = "${pythonPackage}/bin/python";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,5 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.cuda.enable {
|
config = mkIf config.cuda.enable {
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,11 +12,11 @@ with lib;
|
||||||
|
|
||||||
config = mkIf config.jupyter.enable {
|
config = mkIf config.jupyter.enable {
|
||||||
python.enable = mkDefault true;
|
python.enable = mkDefault true;
|
||||||
|
|
||||||
python.packages =
|
python.packages =
|
||||||
p: with p; [
|
p: with p; [
|
||||||
jupyter
|
jupyter
|
||||||
notebook
|
notebook
|
||||||
|
ipykernel
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
userSettings = {
|
userSettings = {
|
||||||
|
"python.defaultInterpreterPath" = "\${env:PYTHONINTERPRETER}";
|
||||||
"[python]" = {
|
"[python]" = {
|
||||||
"editor.defaultFormatter" = "ms-python.black-formatter";
|
"editor.defaultFormatter" = "ms-python.black-formatter";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue