aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/python/default.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/home/python/default.nix b/home/python/default.nix
index a679798..eb03803 100644
--- a/home/python/default.nix
+++ b/home/python/default.nix
@@ -5,7 +5,10 @@ let
black # format
isort # format
pylsp-mypy # language server protocol
- requests # HTTP library # HTTP lib
+ requests # HTTP library
+ pip # to install dependencies
+ ipython # nicer REPL
+ poetry # to install dependencies
]);
in
{
@@ -13,5 +16,14 @@ in
enable = mkEnableOption "python configuration";
};
- config.home.packages = with pkgs.python310Packages; lib.mkIf cfg.enable ([ pythonEnv ]);
+ config = lib.mkIf cfg.enable {
+ home.packages = with pkgs.python310Packages; [ pythonEnv ];
+
+ home.sessionVariables = with config.xdg; {
+ PIP_LOG = "${cacheHome}/pip/pip.log";
+ PYLINTHOME = "${cacheHome}/pylint";
+ PYTHON_EGG_CACHE = "${cacheHome}/python-eggs";
+ PYTHON_HISTFILE = "${cacheHome}/python_history";
+ };
+ };
}