Adopt App Definition and Development / Application Definition & Image Build

Technology Guide

Devenv

License: Apache-2.0

Devenv Logo

Field Guide

Complete Guide

devenv is a Nix-based tool for defining per-project development environments. Instead of writing raw Nix expressions, you describe your environment in a devenv.nix file using a high-level options schema — languages.rust.enable = true;, services.postgres.enable = true;, packages = [ pkgs.ffmpeg ]; — and devenv compiles that to a Nix flake behind the scenes.

Under the hood it builds on Nix flakes, Cachix for binary caches (the project is built by the Cachix team), and process-compose for supervising background services. When you cd into a project with direnv integration, devenv activates the shell with the exact pinned package versions, sets environment variables, and can start supporting processes (Postgres, Redis, MailHog, Caddy, a hundred others) declared in the same file. It supports pre-commit hooks via pre-commit-hooks.nix, containers built directly from the shell via devenv container, and a test runner that asserts the shell is working.

In the “reproducible dev environment” space, devenv competes with plain Nix shells, flox, Mise, asdf, and the devcontainer/DevPod approach. The trade-off is that you get Nix’s reproducibility and huge package set (nixpkgs) without writing Nix from scratch — at the cost of needing Nix installed and tolerating its cold-cache build times. Works on Linux and macOS; Windows is WSL-only.

No articles found for Devenv yet. Check back soon!