zaneyos/modules/home/python.nix
dwilliams 1a2a4f7a5b ran nix fmt ./ with alejandra
On branch main
 Your branch is up to date with 'origin/main'.

 Changes to be committed:
	modified:   hosts/default/variables.nix
	modified:   hosts/nixstation/variables.nix
	modified:   hosts/zaneyos-oem/variables.nix
	modified:   modules/core/ly.nix
	modified:   modules/home/hyprland/hyprlock.nix
	modified:   modules/home/python.nix
	modified:   modules/home/scripts/qs-vid-wallpapers-watchdog.nix
2025-12-14 07:44:47 -05:00

35 lines
1 KiB
Nix

{pkgs, ...}: {
home.packages = with pkgs; [
python3Packages.pip # Python package installer
python3Packages.virtualenv # Virtual environment tool
python3Packages.setuptools # Package development library
python3Packages.black # Code formatter
python3Packages.flake8 # Linting tool
python3Packages.mypy # Type checking
python3Packages.requests # HTTP library for the Weather.py script
];
# Add pip configuration
home.file.".config/pip/pip.conf".text = ''
[global]
user = true
'';
# Set environment variables for Python development
home.sessionVariables = {
PIP_USER = "1";
};
# Create a wrapper script for Weather.py to ensure it uses Python with required packages
home.file.".local/bin/weather" = {
text = ''
#!/bin/sh
# Use python3 with the correct package path
exec ${pkgs.python3.withPackages (p: [p.requests])}/bin/python3 $HOME/.config/waybar/scripts/Weather.py "$@"
'';
executable = true;
};
# Set Python path in environment
home.sessionPath = ["${pkgs.python3}/bin"];
}