Reproducible dotfiles in nix

feat: add bettter direnv

Changed files
+27
files
lib
shared
+26
files/direnvrc
··· 1 + layout_uv() { 2 + if [[ -d ".venv" ]]; then 3 + VIRTUAL_ENV="$(pwd)/.venv" 4 + fi 5 + 6 + if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then 7 + log_status "No virtual environment exists. Executing \`uv venv\` to create one." 8 + uv venv 9 + VIRTUAL_ENV="$(pwd)/.venv" 10 + fi 11 + 12 + PATH_add "$VIRTUAL_ENV/bin" 13 + export UV_ACTIVE=1 # or VENV_ACTIVE=1 14 + export VIRTUAL_ENV 15 + } 16 + 17 + # Define `use micromamba` direnv command that installs micromamba if needed, 18 + # bootstrap and activates an environment given micromamba environment definition 19 + # files. 20 + use_micromamba() { 21 + # Hook micromamba into the shell 22 + eval "$(micromamba shell hook --shell posix)" 23 + 24 + # Activate micromamba environment 25 + micromamba activate $1 || return 1 26 + }
+1
lib/shared/home.nix
··· 445 445 enable = true; 446 446 nix-direnv.enable = true; 447 447 enableZshIntegration = true; 448 + stdlib = builtins.readFile ../../files/direnvrc; 448 449 }; 449 450 450 451 programs.zoxide = {