Skip to content

Commit

Permalink
omnixrc: Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Dec 5, 2024
1 parent d25eab3 commit 7e26d6a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions omnixrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@


use_omnix() {
# Fetch omnix only through binary cache
# Hence `-j0`, as well as `--option builders ''` for when there are remote builders.
: "${OMNIX_BIN:="nix --accept-flake-config --option builders '' -j0 run github:juspay/omnix --"}"
echo "Invoking omnix using: ${OMNIX_BIN}"

# Fetch omnix only through binary cache
# Hence `-j0`, as well as `--option builders ''` for when there are remote builders.
# Run pre-shell stage, which runs health checks and applies changes as necessary.
${OMNIX_BIN} develop --stage=pre-shell $* || exit 1

# Defer to nix-direnv now.
use flake ${*:-.} --accept-flake-config

if [[ ! -z "${NIX_DIRENV_DID_FALLBACK:-}" ]]; then
# Nix shell failed; move on!
# Nix shell failed (direnv fell back to previous instance); move on!
exit
else
# Run post-shell stage (prints 'readme')
${OMNIX_BIN} develop --stage=post-shell $*
fi
}

0 comments on commit 7e26d6a

Please sign in to comment.