Don’t put project deps in your system PATH. Don’t put system deps in your project flake.
nix-devenv is a library of dev shells. Every project repo in the portfolio pulls its flake.nix from here. One source of truth for what “the OpenTofu dev shell” or “the ML dev shell” contains.
What it does
- Exports
devShells.<stack>forterraform,ansible,kubernetes,python,ml, and more - Provides a
mkshelltemplate —nix flake init -t github:JacobPEvans/nix-devenv#mkshell - Pins toolchain versions so every project on the same shell gets the same
terraform/kubectl/ansible - Activated per-project via direnv (
.envrcis committed;.direnv/is gitignored)
How it fits
Getting started
1
Scaffold a flake in your project
cd my-project && nix flake init -t github:JacobPEvans/nix-devenv#mkshell. Edit flake.nix to pick the shell you need.2
Commit `.envrc`
Add
use flake to .envrc. Commit it; direnv activates the shell whenever you cd in.3
Pull a pre-built shell
Skip the local flake and
nix develop github:JacobPEvans/nix-devenv?dir=shells/<lang> for one-off work.Related repos
nix-darwin
The system layer. Tools belong there if every shell needs them.
nix-home
The user layer. Tools belong there if every project needs them but the system doesn’t.
nix-ai
AI-specific dev shell module — composes with this repo’s templates.
Source on GitHub
Templates, shells, full README.