TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/cachix/devenv/llms.txt
Use this file to discover all available pages before exploring further.
devenv.nix file is the heart of every devenv project. It is a Nix module that accepts a set of structured options to declare your developer environment — packages, environment variables, language toolchains, services, processes, tasks, scripts, containers, and more. This page documents every top-level option group available in devenv.nix.
This reference covers the most important option groups. The complete machine-generated list (49,000+ lines) lives in the devenv source repository.
packages
A list of packages to expose inside the developer environment. Search available packages with devenv search NAME.
| Field | Value |
|---|---|
| Type | list of package |
| Default | [] |
env
Environment variables to be exposed inside the developer environment. Accepts any attribute set — values can be strings, numbers, or booleans.
| Field | Value |
|---|---|
| Type | open submodule of lazy attribute set of anything |
| Default | {} |
enterShell
Bash code to execute when entering the developer shell (via devenv shell). Runs after all language and service hooks.
| Field | Value |
|---|---|
| Type | strings concatenated with "\n" |
| Default | "" |
enterTest
Bash code to execute when running tests via devenv test. Runs inside the environment after processes have started.
| Field | Value |
|---|---|
| Type | strings concatenated with "\n" |
| Default | "" |
overlays
A list of nixpkgs overlays to apply. Each overlay is a function (final: prev: { ... }). Requires devenv 1.4.2+.
| Field | Value |
|---|---|
| Type | list of function |
| Default | [] |
unsetEnvVars
A list of environment variable names to unset when entering the shell. Useful for removing variables set by parent shells that would interfere with the environment.
| Field | Value |
|---|---|
| Type | list of string |
| Default | [] |
scripts.<name>.*
Named shell scripts that become available as commands in the developer environment. Scripts are placed on $PATH and can reference all packages in the environment.
Shell code to execute when the script is run, or an absolute path to a script file.
Human-readable description of the script.
The shell package used to run the script.
Extra packages to add to
PATH when the script runs.Override the binary name derived from
package.meta.mainProgram.tasks.<name>.*
Declarative tasks with DAG-based dependency ordering, caching, and parallel execution. Tasks run via devenv tasks run <name> or automatically on shell entry when listed in devenv:enterShell.
Command to execute the task.
Human-readable description of the task.
Tasks that must complete before this task runs. Supports suffixes:
@started, @succeeded (default), @completed.Tasks that should run after this task completes. The inverse of
after.Override the binary name from
package.meta.mainProgram.Working directory to run the task in. Defaults to the project root.
Environment variables to set for this task only.
Paths to files that trigger task execution if modified (enables caching).
Environment variable names this task exports to downstream tasks.
Input values for the task, encoded as JSON.
Package to install for this task.
Always show task output (stdout and stderr), regardless of success or failure.
Shell command to check whether the task should run. Exit code 0 means skip, non-zero means run.
Task type:
oneshot runs once and completes; process is a long-running service.Task dependency suffixes control when the dependency is considered satisfied:
task@started— wait for execution to begintask@succeeded(default for tasks) — wait for successful completiontask@ready(default for processes) — wait for the process readiness probetask@completed— wait for finish regardless of exit code (soft dependency)
processes.<name>.*
Long-running background processes managed by devenv’s native Rust process manager. Start all processes with devenv up.
Bash code to run the process.
Tasks/processes that must be ready before this process starts.
Tasks/processes that should start after this process is ready.
Working directory for the process. Defaults to the current working directory.
Environment variables to set for this process only.
Linux ambient capabilities to add (e.g.
"cap_net_admin"). Requires devenv 2.0+.Socket activation configuration for systemd-style socket passing. Requires devenv 2.0+.
Base port for auto-allocation. devenv increments from this value until a free port is found.
The resolved port value after auto-allocation. Read this in
exec as config.processes.<name>.ports.<port>.value.Readiness probe configuration. Supports
exec, http.get, and systemd notify modes.When to restart the process:
"on_failure" (default) restarts only on non-zero exit, "always" restarts on any exit, "never" never restarts.Maximum number of restarts before giving up.
Time window in seconds for counting restart attempts.
Paths to watch for file changes; the process restarts when changes are detected.
File extensions to watch (e.g.
[".rs" ".toml"]).Glob patterns for paths to ignore when watching.
Watchdog interval in microseconds. The process must notify the watchdog within this interval.
Whether this process should start automatically with
devenv up.languages.<name>.*
devenv ships with 50+ language modules. Each language follows a common pattern — enable it, optionally pin a version or package, and configure tooling. Below are the most commonly used languages; every language also supports a .lsp sub-option to enable the bundled language server.
Common language options pattern
| Option | Type | Description |
|---|---|---|
languages.<lang>.enable | boolean | Whether to enable this language toolchain |
languages.<lang>.package | package | Override the compiler/runtime package |
languages.<lang>.version | string | Pin a specific version (where supported) |
languages.<lang>.lsp.enable | boolean | Enable the bundled LSP server |
languages.<lang>.lsp.package | package | Override the LSP package |
languages.rust.*
Enable the Rust toolchain.
Rust release channel:
"stable", "beta", or "nightly".Rust components to install (e.g.
["rustfmt" "clippy"]).Cross-compilation targets to add (e.g.
["wasm32-unknown-unknown"]).Fine-grained toolchain overrides:
rustc, cargo, clippy, rustfmt, rust-analyzer.Path to a
rust-toolchain.toml file to derive the toolchain from.Use the mold linker for faster builds (Linux only).
Use the Cranelift codegen backend for faster debug builds.
Import function for packaging Rust applications via crate2nix. Use in
outputs.languages.python.*
Enable Python.
Python interpreter package.
Directory containing the Python project (for virtualenv placement).
Enable Poetry package manager.
Run
poetry install automatically on shell entry.Activate the Poetry virtualenv automatically.
Enable manylinux compatibility for binary wheels.
Import function for packaging Python applications via uv2nix. Use in
outputs.languages.javascript.*
Enable Node.js/JavaScript tooling.
Node.js package to use.
Enable Bun runtime.
Run
bun install automatically on shell entry.Enable corepack for package manager management.
Directory containing
package.json.languages.go.*
Enable Go.
Go compiler package.
Pin a specific Go version.
Enable the Delve debugger.
Other supported languages
| Language | Module | Notes |
|---|---|---|
| Android | languages.android | SDK, ABIs, build tools, emulator |
| C / C++ | languages.c, languages.cplusplus | Clang/GCC, clangd LSP |
| Clojure | languages.clojure | clj-kondo LSP |
| Crystal | languages.crystal | shards support |
| Cue | languages.cue | |
| Dart / Flutter | languages.dart | |
| Deno | languages.deno | |
| .NET | languages.dotnet | |
| Elixir | languages.elixir | |
| Elm | languages.elm | |
| Erlang | languages.erlang | |
| Fortran | languages.fortran | |
| Gleam | languages.gleam | |
| Haskell | languages.haskell | cabal, stack, HLS |
| Helm | languages.helm | |
| Idris | languages.idris | |
| Java | languages.java | Gradle, Maven, multiple JDKs |
| PHP | languages.php | FPM pools, extensions |
| Ruby | languages.ruby | |
| Scala | languages.scala | |
| Swift | languages.swift | |
| Terraform | languages.terraform | |
| TypeScript | languages.typescript | |
| Zig | languages.zig |
services.<name>.*
devenv supports 40+ pre-configured services that start with devenv up. Services share common options (enable, package, port) and provide service-specific configuration.
Common service options pattern
| Option | Type | Description |
|---|---|---|
services.<svc>.enable | boolean | Whether to enable the service |
services.<svc>.package | package | Override the service package |
services.<svc>.port | integer | Port to listen on |
services.postgres.*
Enable PostgreSQL.
PostgreSQL package (e.g.
pkgs.postgresql_16).TCP port to accept connections on.
Create a database named after the current user on first start.
PostgreSQL extensions to enable (e.g.
extensions: [ extensions.postgis ]).List of databases to create on first start, each with
name, user, pass, schema, initialSQL.SQL script to run on first initialization.
postgresql.conf settings as a Nix attribute set.Addresses to listen on.
Full content of
pg_hba.conf.Extra arguments to pass to
initdb.services.redis.*
Enable Redis.
Port to listen on.
Address to bind to.
Additional lines for
redis.conf.services.mysql.*
Enable MySQL/MariaDB.
Databases to create on first start, each with
name and optional schema.Users to create with
name, password, host, and ensurePermissions.services.elasticsearch.*
Enable Elasticsearch.
HTTP port.
Enable single-node discovery mode.
services.mongodb.*
Enable MongoDB.
Enable replication.
services.nginx.*
Enable nginx web server.
Raw nginx
http {} block configuration.Virtual host definitions, each with
extraConfig and serverAliases.Other supported services
| Service | Module |
|---|---|
| Adminer | services.adminer |
| Blackfire | services.blackfire |
| Caddy | services.caddy |
| Cassandra | services.cassandra |
| ClickHouse | services.clickhouse |
| CockroachDB | services.cockroachdb |
| DynamoDB Local | services.dynamodb-local |
| EventStoreDB | services.eventstore |
| Grafana | services.grafana |
| Kafka | services.kafka |
| Keycloak | services.keycloak |
| Mailhog | services.mailhog |
| MariaDB | services.mysql (with MariaDB package) |
| Meilisearch | services.meilisearch |
| MinIO | services.minio |
| OpenSearch | services.opensearch |
| Prometheus | services.prometheus |
| RabbitMQ | services.rabbitmq |
| Surrealdb | services.surrealdb |
| Temporal | services.temporal |
| Vault | services.vault |
| Wiremock | services.wiremock |
| Zookeeper | services.zookeeper |
containers.<name>.*
OCI container specifications for building, copying, and running containers without Docker.
Command to run in the container. Can be a string, package, or list of arguments.
Container image name. Defaults to the attribute name.
Container image tag.
Registry to push the container to.
Path(s) to add to the container root. Defaults to the entire project.
Base OCI image to build on top of (built with
nix2container.pullImage).Container entrypoint command.
Working directory inside the container.
Use content-addressed layer deduplication to minimize image size.
Maximum number of layers in the container image.
Default arguments to pass to
skopeo copy.Set to
true inside the container build context. Useful for conditional configuration.outputs.*
Arbitrary Nix outputs exposed for devenv build consumption. Can be any Nix value — packages, derivations, or nested attribute sets.
| Field | Value |
|---|---|
| Type | outputOf (attribute set) |
| Default | {} |
profiles.<name>.*
Profile definitions for environment variants. Activate with --profile <name> or set a default in devenv.yaml.
Additional Nix module configuration to merge when this profile is active.
List of profile names to inherit from.
profiles.hostname.<hostname>.*
Profiles automatically activated when the machine’s hostname matches. Same sub-options as
profiles.<name>.profiles.user.<username>.*
Profiles automatically activated when the current user matches. Same sub-options as
profiles.<name>.files.<name>.*
Files to create and link into the devenv project root. Useful for seeding config files or generating structured configuration from Nix.
Raw text content of the file.
JSON content — automatically serialized.
TOML content — automatically serialized.
YAML content — automatically serialized.
INI content — automatically serialized.
An absolute path to a source file to copy or link.
Make the file executable.
How to materialize the file:
symlink— symlink to the Nix store (read-only, always up to date)seed— copy once if the file doesn’t exist yet (editable)copy— overwrite with fresh contents on every shell entry
git-hooks.*
Integration with git-hooks.nix for managing git pre-commit hooks.
Whether to enable the git-hooks pre-commit module globally.
Default stages for hooks that don’t specify their own.
Global list of regex patterns for files to exclude from all hooks.
git-hooks.hooks.<name>.*
Enable this pre-commit hook. Many well-known hooks are pre-defined; just set
.enable = true.Package providing the hook binary.
The command entry point for the hook.
Additional arguments to pass to the hook command.
Regex pattern for files this hook applies to.
File types this hook applies to.
Language environment for running the hook.
Git stages this hook runs on (e.g.
["pre-commit" "pre-push"]).Pass staged filenames as arguments to the hook.
Run the hook even if no files match.
Stop running hooks after the first failure.
Hook execution priority (lower runs first).
List of hooks that must run after this hook.
List of hooks that must run before this hook.
Extra packages to add to
PATH when the hook runs.alejandra, autoflake, biome, black, clippy, nixfmt, prettier, ruff-check, ruff-format, rustfmt, shellcheck, shfmt, stylua, and many more.
Additional top-level options
| Option | Type | Default | Description |
|---|---|---|---|
certFile | null or absolute path | null | Path to a CA certificate file to trust |
certificates | list of string | [] | List of domain names to generate self-signed certificates for |
cachix.enable | boolean | false | Enable Cachix integration |
cachix.push | null or string | null | Cachix cache name to push to |
cachix.pull | list of string | [] | Cachix caches to pull from |
delta.enable | boolean | false | Integrate delta as the git pager |
devcontainer.enable | boolean | false | Generate .devcontainer.json for VS Code devcontainer support |
difftastic.enable | boolean | false | Integrate difftastic as the git diff tool |
git.root | null or string | null | Git repository root (auto-populated in devenv 1.10+) |
secretspec.enable | boolean (read-only) | false | Whether secretspec integration is active |
secretspec.provider | null or string (read-only) | null | Secretspec provider used to load secrets |
secretspec.profile | null or string (read-only) | null | Secretspec profile used to load secrets |
treefmt.enable | boolean | false | Enable treefmt formatter integration |
process.manager.implementation | string | "process-compose" | Process manager to use with devenv up |
container.isBuilding | boolean | false | true when building any container |
apple.sdk | package | Apple SDK to use on macOS | |
claude.code.enable | boolean | false | Configure Claude Code AI assistant |
