▸ Agent Skills
2 min read

Polyrepos

When working with multiple projects across separate repositories, you may want to compose environments or reference options — such as outputs, packages, or other configuration — defined in one devenv project from another.

There are two approaches:

Both examples below reference the same remote repository (myorg/my-service) with the following configuration:

{ config, ... }: {  languages.python.enable = true;
  outputs.my-service = config.languages.python.import ./. {};
  processes.my-service.exec = "${config.outputs.my-service}/bin/my-service";}

my-service/devenv.nix

Composing with imports

devenv projects compose naturally through imports. When you import another project via an input, all of its configuration — packages, services, outputs, env, and more — merges into your environment.

Add the remote repository as an input, then import from it:

inputs:  my-service:    url: github:myorg/my-serviceimports:  - my-service

devenv.yaml

Any configuration defined in the imported project’s devenv.nix merges into your environment. For example, my-service’s output and process are now available via config:

{ config, ... }: {  # my-service's output is merged into config.outputs  packages = [ config.outputs.my-service ];
  # my-service's process is also merged, so `devenv up` will start it}

devenv.nix

For local cross-project imports (monorepos), see the monorepo guide.

Referencing config across inputs

When you don’t want to merge an entire environment but need access to specific options from another project, you can reference them through inputs.\<name\>.devenv.config. This is particularly useful for consuming outputs defined in other projects.

inputs:  my-service:    url: github:myorg/my-service    flake: false

devenv.yaml

{ inputs, ... }: {  packages = [    inputs.my-service.devenv.config.outputs.my-service  ];
  processes.my-service.exec = "${inputs.my-service.devenv.config.outputs.my-service}/bin/my-service";}

devenv.nix


Last updated Oct 08, 2026