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

om hack: Multi-stage support for direct direnv integration #329

Merged
merged 7 commits into from
Oct 24, 2024
Merged

Conversation

srid
Copy link
Member

@srid srid commented Oct 24, 2024

Add two modes of running om hack:

  1. om hack --stage=pre-shell: Run only health check, and (eventually) auto-resolve cachix use
  2. om hack --stage=post-shell: Render om.hack.readme upon successful Nix shell entering

The typical direnv use flake happens in between (1) and (2). Notably, (2) only happens if the Nix shell succeeds. Thus, this gets rid of our shellHook echo'ing stuff as well.


In a future, I should add support for regular nix develop (non-direnv) support, so om hack should just drop one directly into a Nix shell.

@srid srid marked this pull request as ready for review October 24, 2024 15:48
@srid srid merged commit 8b5dc70 into main Oct 24, 2024
2 checks passed
@srid srid deleted the om-hack-more branch October 24, 2024 15:52
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

Successfully merging this pull request may close these issues.

1 participant