As projects grow, keeping all environment configuration in a singleDocumentation 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 becomes unwieldy. Imports let you split your environment across multiple files — or pull in configuration from remote inputs — and have devenv merge them into one coherent environment.
How imports work
When devenv processes animports list, it evaluates each referenced devenv.nix and merges the results into the top-level environment. Options like packages, processes, and services from every imported file are combined, so running devenv up at the top level starts processes defined in all of them.
Composing
devenv.yaml files via local paths (relative and absolute) is supported as of devenv 1.10. Remote inputs are not yet supported for devenv.yaml imports.Monorepo pattern: frontend + backend
Imagine a typical web application with separate frontend and backend components living in sub-directories. Your top-leveldevenv.yaml can import both:
devenv.yaml
devenv.nix:
How the environment resolves
Enter a sub-directory
When you
cd into frontend/ and run devenv shell, the environment activates based solely on frontend/devenv.nix.Work at the top level
When you run
devenv shell from the project root, devenv merges devenv.nix, frontend/devenv.nix, and backend/devenv.nix into one environment.Importing from remote inputs
You can also importdevenv.nix modules from remote inputs. Add the input to devenv.yaml, then reference it in the imports array by input name and path:
devenv.yaml
devenv.yaml imports reference
Theimports key accepts a list of paths or input-scoped paths:
devenv.yaml
