When working across multiple separate repositories you may want one devenv project to consume configuration, packages, or outputs that are defined in another. devenv supports two complementary patterns: composing entire environments via imports and referencing specific config values across inputs without merging everything.Documentation 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.
Example Remote Repository
Both patterns below reference a sharedmyorg/my-service repository with the following devenv.nix:
my-service/devenv.nix
Pattern 1: Composing with Imports
The simplest approach — add the remote repository as a named input and then list it underimports. All of its configuration (packages, services, outputs, env, processes, etc.) merges into your environment.
devenv.yaml
my-service’s outputs and processes are merged into your environment, you can reference them directly in your own devenv.nix:
devenv.nix
Pattern 2: Referencing Config Across Inputs
Cross-input config references were introduced in devenv v2.0.
inputs.<name>.devenv.config.
Set flake: false on the input to treat it as a plain source rather than a flake:
devenv.yaml
devenv.nix:
devenv.nix
Choosing Between the Two Patterns
| Composing with imports | Referencing config across inputs | |
|---|---|---|
| Merges remote environment (packages, services, env) | ✅ Yes | ❌ No |
| Access specific outputs only | ✅ Possible | ✅ Designed for this |
Remote devenv.yaml evaluated | ❌ No | ❌ No |
| Works with Profiles | ✅ Yes | ❌ No |
| Introduced in version | Initial release | v2.0 |
