# Automatically sets up your devbox environment whenever you cd into this
# directory via our direnv integration:

use_devbox() {
    watch_file devbox.json
    if [ -f .devbox/gen/flake/flake.nix ]; then
        DEVBOX_SHELL_ENABLED_BACKUP=$DEVBOX_SHELL_ENABLED
        eval "$(devbox shellenv --init-hook)"
        export DEVBOX_SHELL_ENABLED=$DEVBOX_SHELL_ENABLED_BACKUP
    fi
}
use devbox

# check out https://www.jetify.com/docs/devbox/ide_configuration/direnv/
# for more details
