Developer Environments using Nix
Your whole development
environment, declared.
Define packages, languages, services, tasks, secrets, and tooling once. Give every developer—and CI—the same fast, reproducible environment.
{ pkgs, ... }: {
languages.rust.enable = true;
services.postgres = {
enable = true;
initialDatabases = [{ name = "app"; }];
};
packages = [ pkgs.cargo-watch ];
}Languages · Services · Tools
Three steps. Done.
From zero to a reproducible environment your whole team can use.
Install
Once Nix is installed. Works on Linux, macOS, and WSL.
$ nix profile install nixpkgs#devenvInitialize & describe
Scaffold the project, then edit devenv.nix or generate it from a prompt above.
$ devenv init
$EDITOR devenv.nixActivate
Everything available, in under 100ms after the first build.
$ devenv shell
(devenv) $ cargo runYour whole stack, declared together
Languages, services, processes, tasks, secrets — all declarative.
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" \
shellSearch 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.enableWarm shells in milliseconds.
Auto-invalidated evaluation caching skips unchanged work. No daemons. No manual cache management. How it works.
Cached shell startup
<100ms
Many environments. One shell.
Import config across folders and repositories. First-class monorepo support.
services.postgres.enable = true;
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.
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" ];
};One devenv up. Whole stack alive.
Built-in process supervision: dependencies, ready probes, restart policies, socket activation, automatic port allocation. Or swap in process-compose, overmind, mprocs.
pg_isreadyon-failurepostgrespostgres, redis, migrateDeclared once in devenv.nix. Started, ordered, restarted, and stopped by the native supervisor.
Declare a secret. Swap the source.
The same declaration reads from Keychain, 1Password, dotenv, or env. Load secrets at runtime without committing their values.
[project]
name = "my-app"
[profiles.default]
DATABASE_URL = { required = true }
STRIPE_SECRET_KEY = { required = true }DATABASE_URL$ secretspec run -- npm start — exposed only to the appFrom dev shell to deployable artifact.
Same languages, same versions, same packages. Define outputs and ship a Nix derivation.
languages.rust.enable = true;
outputs.app =
config.languages.rust.import ./. {};$ devenv build outputs.app
• Built /nix/store/...-app
in 12.4s$ nix copy --to ssh://deploy \
/nix/store/...-appBuilt in the open
Active community, frequent releases, and a growing ecosystem of services and languages.
Start building.
Set up your first environment in minutes — or generate one from the hero above.

