refactor python module

This commit is contained in:
Daylin Morgan 2024-06-25 11:39:41 -05:00
parent cb6c14f81e
commit 506e9abcee
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 16 additions and 21 deletions

View file

@ -30,7 +30,6 @@
# setLdLibraryPath = true; # setLdLibraryPath = true;
# }; # };
# Load nvidia driver for Xorg and Wayland # Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];

View file

@ -8,16 +8,13 @@
let let
inherit (lib) mkIfIn; inherit (lib) mkIfIn;
cfg = config.oizys.languages; cfg = config.oizys.languages;
in
{
config = mkIfIn "python" cfg {
environment.systemPackages =
let
python = pkgs.python3.withPackages (ps: with ps; [ pip ]); python = pkgs.python3.withPackages (ps: with ps; [ pip ]);
pixi = inputs.pixi.packages.${pkgs.system}.default; pixi = inputs.pixi.packages.${pkgs.system}.default;
in in
with pkgs; {
[ config = mkIfIn "python" cfg {
environment.systemPackages = [
# https://github.com/Mic92/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld # https://github.com/Mic92/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
(pkgs.writeShellScriptBin "python" '' (pkgs.writeShellScriptBin "python" ''
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
@ -29,9 +26,8 @@ in
exec ${python}/bin/python "$@" exec ${python}/bin/python "$@"
'') '')
(python3.withPackages (ps: with ps; [ pip ]))
micromamba
pixi pixi
pkgs.micromamba
]; ];
}; };
} }