devenv icon indicating copy to clipboard operation
devenv copied to clipboard

Task Tags for Composed Environments

Open rawkode opened this issue 8 months ago • 2 comments

When I have a monorepo and I'm composing all my devenv's together at the root:

# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
  nixpkgs:
    url: github:cachix/devenv-nixpkgs/rolling
  root:
    url: .
    flake: false

imports:
 - root/projects/rawkode.academy/a
 - root/projects/rawkode.academy/b
 - root/projects/rawkode.academy/c
 - root/projects/rawkode.academy/d

It would be nice to run devenv task run #ci and it executes all tasks with a tag == ci:

{ pkgs, lib, config, inputs, ... }:

{
  packages = [ pkgs.bun ];

  tasks = {
    "db:generate-migrations" = {
      exec = "echo one";
      tags = [ "ci" ];
    };
  };
}

rawkode avatar Apr 28 '25 10:04 rawkode

Did you check out the new options (ad-hoc environments) launched in 1.6? I think you should be able to define options for this and turn them on / off like this. Also check out #1703

clotodex avatar Apr 28 '25 12:04 clotodex

I think we should support this, but using @tag syntax for the name.

domenkozar avatar Oct 09 '25 22:10 domenkozar