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

omnixrc - needs to respect cached devshell #339

Closed
srid opened this issue Nov 2, 2024 · 3 comments
Closed

omnixrc - needs to respect cached devshell #339

srid opened this issue Nov 2, 2024 · 3 comments
Assignees

Comments

@srid
Copy link
Member

srid commented Nov 2, 2024

It should not re-run health and other stuff when nix-direnv will be using the cached devshell. Otherwise there is perceptible delay every time we cd to the project dir.

image

This was referenced Nov 12, 2024
@shivaraj-bh
Copy link
Member

What if we have omnix-direnv like nix-direnv? omnix-direnv will provide custom direnvrc configuration to support preShell and postShell. In order to respect cached devShell we can use the same strategy as nix-direnv to cache the output of nix print-dev-env, see https://github.com/nix-community/nix-direnv/blob/7789681eb28fae8de052866f14d009f2375f9362/direnvrc#L335-L349. omnix-direnv will cache three devShells instead of just one. I haven’t completely thought this through, just wanted to put this idea out.

@srid
Copy link
Member Author

srid commented Nov 26, 2024

#352 helps, but we are still running nix commands:

image

This is because OmConfig::get forces the caller to pass NixCmd even though it is never used when om.yaml is present.

@srid
Copy link
Member Author

srid commented Dec 2, 2024

Sufficiently resolved using YAML config.

@srid srid closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants