Add devenv-up into the shell environment #1142
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This brings devenv-up as a package which is brought into the shell environment.
devenv-up
is now present in the $PATH and runs it immediately anddevenv up
execs.The main motivation here is when using a Flake directly. Previously
devenv up
would runnix build
on demand which is (1) fragile since it makes assumptions around what the flake is actually called and (2) doesn't register it as root.By bringing the devenv-up into shell we solve both of these problems. Be aware that we're not able to bring it into the profile since this leads to a infinite recursion: The devenv-up script is designed to run "outside" of the devenv environment (since the process-compose.yaml file sets the environment variables for you).
This commit doesn't change behavior in the Rust implementation, but I believe we could now also tweak this to invoke
devenv-up
directly instead of adding it as a root.