diff --git a/home/python.nix b/home/python.nix index aef1d31..050edb4 100644 --- a/home/python.nix +++ b/home/python.nix @@ -3,46 +3,6 @@ home.packages = [ pkgs.poetry - (pkgs.python3.withPackages ( - ppkgs: with ppkgs; [ - pip - numpy - sympy - scipy - matplotlib - requests - pandas - scikit-learn - nltk - huggingface-hub - flask - gunicorn - torch - opencv-python - pillow - keras - tqdm - tkinter - ipykernel - pyyaml - authlib - litellm - flake8 - pycryptodome - seaborn - docling-core - openai - transformers - langchain - langchain-community - pydantic - pydantic-core - datasets - tokenizers - accelerate - peft - bitsandbytes - ] - )) + (pkgs.python3.withPackages (import ../modules/python-packages.nix)) ]; } diff --git a/hosts/legolas/configuration.nix b/hosts/legolas/configuration.nix index b1fb121..97e0535 100644 --- a/hosts/legolas/configuration.nix +++ b/hosts/legolas/configuration.nix @@ -31,9 +31,9 @@ ../../modules/powerprofiles.nix ../../modules/basePackages.nix ../../modules/develPackages.nix - ../../modules/jupyterhub.nix + #../../modules/jupyterhub.nix ../../modules/blog.nix - ../../modules/ollama.nix + #../../modules/ollama.nix #../../modules/docling.nix # temp for dev ... Waiting for non broken docling-serve ../../modules/kdeconnect.nix ../../modules/desktopApplications.nix diff --git a/modules/desktopApplications.nix b/modules/desktopApplications.nix index fe85f4c..61a77d3 100644 --- a/modules/desktopApplications.nix +++ b/modules/desktopApplications.nix @@ -34,10 +34,9 @@ prusa-slicer freecad-wayland openscad-unstable - kicad - easyeda2kicad + #kicad # somehow stalls building. + #easyeda2kicad # could not build - #kicad-unstable easyeffects musescore mpv diff --git a/modules/develPackages.nix b/modules/develPackages.nix index 9de4a61..8f8324d 100644 --- a/modules/develPackages.nix +++ b/modules/develPackages.nix @@ -48,37 +48,11 @@ nodejs-slim node2nix - jupyter - uv poetry thonny - (python3.withPackages ( - ps: with ps; [ - ipykernel - flask - flask-sqlalchemy - flask-socketio - werkzeug - pyyaml - authlib - litellm - requests - flake8 - torch - pycryptodome - numpy - scipy - pandas - matplotlib - vispy - pyvista - pygame - seaborn - scikit-learn - ] - )) + (python3.withPackages (import ./python-packages.nix)) github-copilot-cli diff --git a/modules/jupyterhub.nix b/modules/jupyterhub.nix index ab5bf6f..71e5a3f 100644 --- a/modules/jupyterhub.nix +++ b/modules/jupyterhub.nix @@ -5,50 +5,31 @@ ... }: let + myPythonPackages = import ./python-packages.nix; + myPython = pkgs.python3; myJupyterHubEnv = myPython.withPackages ( - ps: with ps; [ + ps: + with ps; + [ jupyterhub jupyterhub-systemdspawner - ipython - jupyterlab - notebook - ipykernel - numpy - scipy - pandas - matplotlib - seaborn - scikit-learn ] + ++ myPythonPackages ps ); myJupyterLabEnv = myPython.withPackages ( - ps: with ps; [ + ps: + with ps; + [ jupyterhub - jupyterlab - ipykernel - numpy - scipy - pandas - matplotlib - seaborn - scikit-learn ] + ++ myPythonPackages ps ); in { - environment.systemPackages = with pkgs; [ - python3Packages.numpy - python3Packages.scipy - python3Packages.pandas - python3Packages.matplotlib - python3Packages.seaborn - python3Packages.scikit-learn - ]; - users.users.tdt4117 = { isNormalUser = true; home = "/home/tdt4117"; @@ -72,35 +53,7 @@ in kernels = { python3 = let - env = ( - pkgs.python3.withPackages ( - pythonPackages: with pythonPackages; [ - ipykernel - pandas - scikit-learn - seaborn - huggingface-hub - datasets - matplotlib - tqdm - numpy - scipy - pip - torch - torchvision - lightning - numpy - scipy - matplotlib - scikit-image - jupyterlab - ipykernel - pillow - tqdm - pandas - ] - ) - ); + env = pkgs.python3.withPackages myPythonPackages; in { displayName = "Python 3 for machine learning"; diff --git a/modules/python-packages.nix b/modules/python-packages.nix new file mode 100644 index 0000000..2c86ce7 --- /dev/null +++ b/modules/python-packages.nix @@ -0,0 +1,51 @@ +ps: with ps; [ + ipykernel + jupyter + jupyterlab + notebook + numpy + scipy + pandas + matplotlib + seaborn + scikit-learn + scikit-image + sympy + nltk + huggingface-hub + datasets + tokenizers + transformers + accelerate + peft + bitsandbytes + torch + torchvision + lightning + keras + opencv-python + pillow + pyvista + vispy + pygame + tqdm + flask + flask-sqlalchemy + flask-socketio + werkzeug + gunicorn + requests + pyyaml + authlib + litellm + openai + langchain + langchain-community + pydantic + pydantic-core + docling-core + pycryptodome + flake8 + pip + tkinter +]