1
0
mirror of https://codeberg.org/diginaut/dotfiles.git synced 2026-02-04 19:20:27 +01:00

Compare commits

...

5 Commits

Author SHA1 Message Date
ba6dbcd66c direnv notice 2025-12-30 22:22:15 +01:00
cffb3bf714 Merge branch 'master' of codeberg.org:diginaut/dotfiles 2025-12-30 22:19:50 +01:00
55d4f43141 Symlink the direnv configuration file 2025-12-30 22:15:44 +01:00
fa2ff5074c uv direnv support 2025-12-30 22:08:26 +01:00
b2324c0e9c Update README with repository migration notice
Added a warning about moving the repository to Codeberg and clarified that it is not mirrored.
2025-12-23 16:42:53 +01:00
3 changed files with 25 additions and 2 deletions

19
.config/direnv/direnvrc Normal file
View File

@@ -0,0 +1,19 @@
layout_uv() {
if [[ -d ".venv" ]]; then
VIRTUAL_ENV="$(pwd)/.venv"
fi
if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then
log_status "No virtual environment exists. Executing \`uv venv\` to create one."
uv venv
VIRTUAL_ENV="$(pwd)/.venv"
fi
if [ -d ".venv/bin" ]; then
PATH_add .venv/bin
elif [ -d ".venv/Scripts" ]; then
PATH_add .venv/Scripts
fi
export UV_ACTIVE=1 # or VENV_ACTIVE=1
export VIRTUAL_ENV
}

View File

@@ -15,7 +15,8 @@ sh install.sh # follow the instructions and install the files in the homedir
Extra's: Extra's:
[virtualfish](https://virtualfish.readthedocs.io/en/latest/install.html) for virtualenv(wrapper) integration in `fish` shell. - [virtualfish](https://virtualfish.readthedocs.io/en/latest/install.html) for virtualenv(wrapper) integration in `fish` shell.
- *N.B.:* virtualfish might be on its way out, with `uv` and `direnv` configurations
## Dependency on `fzf` and ripgrep `rg` ## Dependency on `fzf` and ripgrep `rg`

View File

@@ -62,8 +62,11 @@ DATETIME=$(date +%Y%m%d_%H%M)
# Go home # Go home
cd || exit cd || exit
# We need this config (sub)dir to exist for the symlink
mkdir -p .config/direnv
# Symlink all the things # Symlink all the things
for TARGET in .bash_aliases .bashrc bin .gitconfig .gitignore_global .gitmodules .hgauthors.txt .hgignore .hgrc .ideavimrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh for TARGET in .bash_aliases .bashrc bin .gitconfig .gitignore_global .gitmodules .hgauthors.txt .hgignore .hgrc .ideavimrc .ignore .screenrc .terminfo .tmux.conf .vim .vimrc install.sh .config/direnv/direnvrc
do do
make_link $DIR $TARGET make_link $DIR $TARGET
done done