A minimal template for nbdev projects using uv2nix and Nix flakes.
- nbdev3 Support: Fully compliant with the Jan 2026 major update (no
settings.ini, all configurations inpyproject.toml). - uv2nix integration: Fast and reproducible dependency management using
uv. - Nix flake: Deterministic development environment and build.
- src-layout: Modern Python project structure.
- Click the "Use this template" button at the top of this repository page.
- Clone your new repository.
- Important: Update the project details in
pyproject.toml(especiallyname,authors, and[tool.nbdev]settings).
# After cloning your new repository
cd your-project-name
# If using direnv:
direnv allow
# Add new Python dependencies
uv add <package-name>
# Sync Nix environment
direnv reload
# Edit your notebooks in nbs/ directory...
# Export notebooks to library (src/uv2nix_nbdev_template/)
nbdev-export
This template follows the latest nbdev standards. It uses pyproject.toml for all configurations, including nbdev specific settings under [tool.nbdev]. This eliminates the need for a separate settings.ini file.
flake.nix: Nix flake configuration.pyproject.toml: Python project dependencies andnbdevsettings.nbs/: Jupyter notebooks for development and documentation.src/: Exported Python library (automatically managed bynbdev-export).uv.lock: Lock file for Python dependencies..envrc: direnv configuration.
MIT