Add python dependencies

This commit is contained in:
ItsDrike 2024-06-27 00:26:29 +02:00
parent 7c3098c74f
commit 8a4d6ba1cb
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
5 changed files with 22 additions and 9 deletions

View file

@ -5,6 +5,7 @@
./poetry.nix
./rye.nix
./pyright.nix
./mypy.nix
./ruff.nix
];
}

View file

@ -0,0 +1,14 @@
{
lib,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.coding.python;
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [ python312Packages.mypy ];
};
}

View file

@ -14,6 +14,11 @@ in {
settings = {
virtualenvs = {
in-project = true;
# use python the version of python that's globally installed on the system
# and exists in PATH, instead of the python version poetry was installed
# with. Annoyingly, there's no good way to override the python version at
# which NixOS will built poetry here, so this is the next best thing.
prefer-active-python = true;
};
};

View file

@ -9,14 +9,6 @@
cfg = osConfig.myOptions.home-manager.programs.coding.python;
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [
python38
python39
python310
python311
python312
python313
];
home.packages = with pkgs; [ python312 ];
};
}

View file

@ -5,5 +5,6 @@ _: {
./editors
./file-managers
./emulators
./coding
];
}