Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composing devenv.yaml #14

Open
domenkozar opened this issue Nov 9, 2022 · 3 comments
Open

Composing devenv.yaml #14

domenkozar opened this issue Nov 9, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@domenkozar
Copy link
Member

domenkozar commented Nov 9, 2022

Please leave a thumbs up if you'd like to see this happen and a comment with your use case.

@domenkozar domenkozar added the enhancement New feature or request label Nov 9, 2022
@majidaldo
Copy link

majidaldo commented May 18, 2023

i'm coming from a conda-centric data science experience. i really want this to work!
https://github.com/pnnl/hydraconda/blob/master/project/readme.md

i've been looking for ways to create composable environments.

@edrex
Copy link
Contributor

edrex commented Jan 31, 2024

I have a devenv file in my home dir / repo, and a bunch of task-specific environments in subdirs. They all want to track nixpkgs independently while I'd like to just track it once at the top level. Would this help with that?

My current workaround is to have each devenv.yaml point to the nixpkgs entry in the nix input registry:

inputs:
  nixpkgs:
    url: nixpkgs

( which on my systems is set to the nixpkgs entry revision used to build the system:

registry.nixpkgs.to = {
  owner = "NixOS";
  repo = "nixpkgs";
  rev = inputs.nixpkgs.rev;
  type = "github";
};

)

Other than not being as clean as referencing the input used at the repo root, the downside is the lock files still need to be updated individually for each subdir when the registry entry is updated.

@euphemism
Copy link

Getting around to experimenting with devenv. Like the above comment, I'm interested in hoisting shared configuration to a single place, and then consuming that in a number of repositories.

For example, in this higher-up shared environment configuration, I have something that checks for package.json in the project root, and if present configures JavaScript with a specific package version and setup. In this way, arbitrary repositories that consume the devenv environment from this one just magically have identical JavaScript tooling setup, without needing to add that to the individual repositories' devenv.nix files.

Extending that, I tried to setup something similar for Terraform. i.e. if there are any .tf files in the repo, setup the environment with Terraform support. Unfortunately, devenv gives me the following message in these downstream repos:

error: To use 'languages.terraform.version', run the following command:

  $ devenv inputs add nixpkgs-terraform github:stackbuilders/nixpkgs-terraform

Presumably, this could be an input at the top level and propagated downstream if devenv.yaml could be composed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants