diff options
| -rw-r--r-- | hosts/gheshki/userOptions.nix | 1 | ||||
| -rw-r--r-- | hosts/mentat/userOptions.nix | 1 | ||||
| -rw-r--r-- | modules/base.nix | 1 | ||||
| -rw-r--r-- | modules/python.nix | 25 |
4 files changed, 28 insertions, 0 deletions
diff --git a/hosts/gheshki/userOptions.nix b/hosts/gheshki/userOptions.nix index 72631ce..9854bd1 100644 --- a/hosts/gheshki/userOptions.nix +++ b/hosts/gheshki/userOptions.nix @@ -4,4 +4,5 @@ gitEmail = "amir@glgdgt.com"; gitName = "Amir Saeid"; fontName = "BlexMono Nerd Font"; + pythonVersion = "3.14"; } diff --git a/hosts/mentat/userOptions.nix b/hosts/mentat/userOptions.nix index dfe8fcf..8fa43a3 100644 --- a/hosts/mentat/userOptions.nix +++ b/hosts/mentat/userOptions.nix @@ -4,4 +4,5 @@ gitEmail = "amir@glgdgt.com"; gitName = "Amir Saeid"; fontName = "BlexMono Nerd Font"; + pythonVersion = "3.14"; } 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; + }; +} |
