Important
This repository is in its early stages and not yet stable.
nix-shell-parts is a lightweight kickstarter for adding Nix development and deployment shells to a project without needing to know much about Nix, flakes and how to structure a project upfront.
It provides a buffet of reusable Flake Parts modules and shell modules (under perSystem.shellModules) for common needs like devshells, formatting, and git hooks.
You have all options available but nothing is enabled until you turn it on, with only a few sensible defaults set (mainly system).
- Nix with Flakes enabled
Standard template (uses this repo as an input):
nix flake init -t github:ergon/nix-shell-parts?ref=v1Vendored template (copies all modules into your repo):
nix flake init -t github:ergon/nix-shell-parts?ref=v1#vendoredWhen to use which?
- Standard template: normal flake dependency, easy upgrades by updating your flake input.
- Vendored template: everything lives in your repo, but you must manually pull updates later.
See templates/nix-shell-parts/flake.nix for a minimal example.
All modules are already exported by this flake, so you do not need to import anything manually. You simply enable and configure the pieces you want through the module system, and leave the rest off. If you want to see concrete setups, the templates directory contains minimal working examples to copy from.
The documentation including all options are published at: https://ergon.github.io/nix-shell-parts/