A minimal template for Python projects using uv2nix and Nix flakes.
- Simple Python project structure
- uv2nix integration for dependency management
- Nix flake for reproducible development environments
- Click the "Use this template" button at the top of this repository page
- OR use GitHub CLI:
gh repo create my-project --template KaoruBB/uv2nix-template - Clone your new repository and update the project details in
pyproject.toml
# After cloning your new repository
cd your-project-name
# If using direnv:
direnv allow
# Alternatively, manually enter the development shell:
nix develop
# Run the example
python main.py- Run
uv add <package>to add a new Python package. - Update the flake with
direnv reload
flake.nix: Nix flake configurationpyproject.toml: Python project dependenciesmain.py: Example Python scriptuv.lock: Lock file for Python dependencies.envrc: direnv configuration for automatic environment activation
MIT