#!/usr/bin/env bash

export DIRENV_WARN_TIMEOUT=20s

# Add system NVIDIA libraries for PyTorch CUDA support
if [ -d "/run/opengl-driver/lib" ]; then
    export LD_LIBRARY_PATH="/run/opengl-driver/lib:$LD_LIBRARY_PATH"
fi

eval "$(devenv direnvrc)"

# `use devenv` supports the same options as the `devenv shell` command.
#
# To silence all output, use `--quiet`.
#
# Example usage: use devenv --quiet --impure --option services.postgres.enable:bool true
use devenv
#
# Set VIRTUAL_ENV for vim-jedi and other Python tools
export VIRTUAL_ENV="${DEVENV_ROOT}/.devenv/state/venv"
