diff options
| author | Amir Saeid <amir@glgdgt.com> | 2026-05-10 21:43:20 +0100 |
|---|---|---|
| committer | Amir Saeid <amir@glgdgt.com> | 2026-05-10 21:43:20 +0100 |
| commit | c32f17dfc3b5f125828b0d880526f697f67cbb9c (patch) | |
| tree | 5c4223004727383226cd2668e4ac1bcff9ad833d /modules | |
| parent | d19cb434e4b633dfff78bd40bb6977f2200efaaa (diff) | |
Add a python module
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/base.nix | 1 | ||||
| -rw-r--r-- | modules/python.nix | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/modules/base.nix b/modules/base.nix index 1ebc61a..0f1218e 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -11,6 +11,7 @@ imports = [ ./host-common.nix ./dev-tools.nix + ./python.nix ./shell.nix ./term.nix ]; diff --git a/modules/python.nix b/modules/python.nix new file mode 100644 index 0000000..56eadb3 --- /dev/null +++ b/modules/python.nix @@ -0,0 +1,25 @@ +{ + config, + pkgs, + lib, + userOptions, + ... +}: +let + pythonVersion = lib.replaceStrings [ "." ] [ "" ] userOptions.pythonVersion; + python = pkgs."python${pythonVersion}"; + pythonPackages = pkgs."python${pythonVersion}Packages"; +in +{ + home.packages = with pkgs; [ + python + pipenv + pythonPackages.virtualenv + pythonPackages.uv + ]; + + programs.pyenv = { + enable = true; + enableZshIntegration = true; + }; +} |
