Skip to content
devenv 2.2: attach to running processes and persistent out-of-tree environments

Your whole development
environment, declared.

Define packages, languages, services, tasks, secrets, and tooling once. Give every developer—and CI—the same fast, reproducible environment.

Ready to compose
Ingredient streamsDrag anything into the file. Send configured items back to remove them.
devenv.nix
{ pkgs, ... }: {  languages = {    # devenv.sh/languages/rust/    rust = {      enable = true;      channel = "stable";    };  };   services = {    # devenv.sh/services/postgres/    postgres = {      enable = true;      initialDatabases = [{ name = "app"; }];    };     # devenv.sh/services/redis/    redis.enable = true;  };   # devenv.sh/tasks/  tasks."app:test".exec = "cargo test";   # devenv.sh/integrations/secretspec/  processes.api.exec =    "secretspec run -- cargo run";   packages = [    # devenv.sh/packages/    pkgs.docker  ];}

Languages · Services · Tools

Ansible
C
Clojure
C++
Crystal
CUE
Dart
Deno
.NET
Elixir
Elm
Erlang
Fortran
GNU Awk
Gleam
Go
Hare
Haskell
Helm
Idris
Java
JavaScript
Jsonnet
Julia
Kotlin
Lean 4
Lobster
Lua
Nim
Nix
OCaml
Odin
OpenTofu
Pascal
Perl
PHP
Pkl
PureScript
Python
R
Racket
Raku
Robot Framework
Ruby
Rust
Scala
Shell
Solidity
Standard ML
Swift
Terraform
TeX Live
TypeScript
Typst
Unison
V
Vala
Zig
Ansible
C
Clojure
C++
Crystal
CUE
Dart
Deno
.NET
Elixir
Elm
Erlang
Fortran
GNU Awk
Gleam
Go
Hare
Haskell
Helm
Idris
Java
JavaScript
Jsonnet
Julia
Kotlin
Lean 4
Lobster
Lua
Nim
Nix
OCaml
Odin
OpenTofu
Pascal
Perl
PHP
Pkl
PureScript
Python
R
Racket
Raku
Robot Framework
Ruby
Rust
Scala
Shell
Solidity
Standard ML
Swift
Terraform
TeX Live
TypeScript
Typst
Unison
V
Vala
Zig
Adminer
Blackfire
Caddy
Cassandra
ClickHouse
CockroachDB
CouchDB
DynamoDB Local
ElasticMQ
Elasticsearch
Garage
httpbin
InfluxDB
Kafka
Keycloak
MailHog
Mailpit
Meilisearch
Memcached
MinIO
MongoDB
Mosquitto
MySQL
NATS
nginx
Nixseparatedebuginfod
OpenSearch
OpenTelemetry Collector
PostgreSQL
Prometheus
RabbitMQ
Redis
RustFS
sqld
Tailscale Funnel
Temporal
Tideways
Traffic Server
Typesense
Varnish
Vault
WireMock
Adminer
Blackfire
Caddy
Cassandra
ClickHouse
CockroachDB
CouchDB
DynamoDB Local
ElasticMQ
Elasticsearch
Garage
httpbin
InfluxDB
Kafka
Keycloak
MailHog
Mailpit
Meilisearch
Memcached
MinIO
MongoDB
Mosquitto
MySQL
NATS
nginx
Nixseparatedebuginfod
OpenSearch
OpenTelemetry Collector
PostgreSQL
Prometheus
RabbitMQ
Redis
RustFS
sqld
Tailscale Funnel
Temporal
Tideways
Traffic Server
Typesense
Varnish
Vault
WireMock
Docker
Git
curl
jq
ripgrep
cargo-watch
AWS CLI
Terraform CLI
Node.js 22
ShellCheck
just
Test task
App process
SecretSpec
Pre-commit
Docker
Git
curl
jq
ripgrep
cargo-watch
AWS CLI
Terraform CLI
Node.js 22
ShellCheck
just
Test task
App process
SecretSpec
Pre-commit

Three steps. Done.

From zero to a reproducible environment your whole team can use.

1

Install

Once Nix is installed. Works on Linux, macOS, and WSL.

$ nix profile install nixpkgs#devenv
2

Initialize & describe

Scaffold the project, then edit devenv.nix or generate it from a prompt above.

$ devenv init
$EDITOR devenv.nix
3

Activate

Everything available, in under 100ms after the first build.

$ devenv shell
(devenv) $ cargo run

Your whole stack, declared together

Languages, services, processes, tasks, and secrets. Everything is declarative.

58

Languages

Python, Rust, Go, Node, Ruby, PHP, Java, Elixir, and more, with version pinning and LSP servers.

Services

42 preconfigured services, including PostgreSQL, Redis, MySQL, RabbitMQ, MinIO, Caddy, and Elasticsearch.

services.postgres.enable = true;
services.redis.enable = true;

Processes

Declarative process management with logs, restarts, and dependencies. Just devenv up.

Tasks & git hooks

Define dependencies, run in parallel, hook into your shell or commits. Linters, formatters, codegen.

tasks."app:build" = {
exec = "yarn build";
before = [ "devenv:enterShell" ];
};

SecretSpec

Declarative secrets from Keychain, 1Password, LastPass, or dotenv. Keep values out of config and committed .env files.

processes.api.exec =
"secretspec run -- npm start";

Containers

Build OCI containers from your dev environment. Same packages, same versions, same behavior.

Tests

Run integration tests with all processes active. devenv test and done.

Basics

Packages, variables, files, and scripts in native bash, zsh, fish, or nushell. Auto-activate on cd and apply updates at the next prompt.

Ad-hoc shells, zero config

Spin up a temporary environment without writing a devenv.nix. Great for experiments, scripts, and CI matrices.

$ devenv -O languages.python.enable:bool true \
-O languages.python.version:string "3.12" \
shell

Search packages & options

Search 100,000+ packages and every devenv option from the CLI, using the exact Nixpkgs version pinned by your project.

$ devenv search postgres
pkgs.postgresql_17
services.postgres.enable
Evaluation caching

Warm shells in milliseconds.

Auto-invalidated evaluation caching skips unchanged work. No daemons. No manual cache management. How it works.

Cached shell startup

<100ms

Cold
4832 ms
Warm
47 ms

Same config. ~100× faster on every subsequent shell.

Composability

Many environments. One shell.

Import config across folders and repositories. First-class monorepo support.

frontend/devenv.nix
languages.javascript.enable = true;
backend/devenv.nix
languages.rust.enable = true;
services.postgres.enable = true;
github:myorg/shared
services.redis.enable = true;
Unified environment
$ devenv shell
noderustpostgresredis
Profiles

One project. Every workflow.

Switch between frontend, backend, testing, and full-stack environments without duplicating configuration. Layer profiles manually or activate them by hostname and user.

$ devenv --profile backend shell
postgresredisAPI tools
$ devenv --profile fullstack up
backendfrontenddev server
hostname.ci-runner + user.alice
automaticdeterministic priority
devenv.nix
profiles = {
backend.module = {
services.postgres.enable = true;
services.redis.enable = true;
};

frontend.module = {
languages.javascript.enable = true;
processes.dev.exec = "npm run dev";
};

fullstack.extends = [ "backend" "frontend" ];
};
postgresrunning
port :5432 · uptime 3m 12s
ready probe: pg_isready
redisrunning
port :6379 · uptime 3m 12s
restart: on-failure
migratecompleted
one-shot · exit 0
after: postgres
apirunning
port :8080 · uptime 3m 09s
after: postgres, redis, migrate
socket activation · zero-downtime restarts

Declared once in devenv.nix. Started, ordered, restarted, and stopped by the native supervisor.

SecretSpec

Declare a secret. Swap the source.

The same declaration reads from Keychain, 1Password, dotenv, or env. Load secrets at runtime without committing their values.

secretspec.toml
[project]
name = "my-app"

[profiles.default]
DATABASE_URL = { required = true }
STRIPE_SECRET_KEY = { required = true }
Source: macOS Keychain
secretspec.toml declares DATABASE_URL
$ secretspec run -- npm start, exposed only to the app
Packaging

From dev shell to deployable artifact.

Same languages, same versions, same packages. Define outputs and ship a Nix derivation.

1 · Declare
devenv.nix
languages.rust.enable = true;
outputs.app =
config.languages.rust.import ./. {};
2 · Build
devenv build
$ devenv build outputs.app
Built /nix/store/...-app
in 12.4s
3 · Ship
Nix store · binary cache · CI
$ nix copy --to ssh://deploy \
/nix/store/...-app

Start building.

Set up your first environment in minutes, or generate one from the hero above.