cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
4.04k stars 303 forks source link

direnv: Problems with imported nix file changes #1229

Open vHanda opened 3 months ago

vHanda commented 3 months ago

Describe the bug I'm trying to share my devenv.nix configuration across my company, so that more people might be inclined to move towards nix and devenv, instead of having ad-hoc environments.

Since we have many repos, I don't want to create and maintain the devenv files per repo. I'd prefer to do it globally. I've done this by having the devenv.nix/yaml/lock files in a single repo, and asking people to include it in their devenv.nix yaml config.

imports:
  - ./relevant-repo/devenv

I like using devenv with direnv so that one doesn't have to use the 'devenv shell' command.

Via 'devenv shell' everything works great.

Problems -

What command can I use to force 'direnv' to use the latest devenv files?

Version

devenv 1.0.5 (x86_64-linux) - Not using flakes

thenonameguy commented 3 months ago
  1. I would add an input to a shared Github repository instead of a local folder
  2. Once the above is done, you can run devenv update to explictly bump the internal Flake input for the shared config. This also updates the lock file, making the update more explicit.

This is somewhat of a duplicate of https://github.com/cachix/devenv/issues/14