From 7e26d6a756f6d26e7959a3a05575ddf7c6ca9588 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Thu, 5 Dec 2024 16:35:30 -0500 Subject: [PATCH] omnixrc: Update comments --- omnixrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/omnixrc b/omnixrc index ae056249..db1962d5 100644 --- a/omnixrc +++ b/omnixrc @@ -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 }