coding: direnv: load .envrc.local

This commit is contained in:
2026-08-16 15:30:01 +08:00
parent 810641a7bb
commit 86a132344a
+17
View File
@@ -28,6 +28,23 @@ in
hide_env_diff = false;
};
};
stdlib = lib.mkAfter ''
if [[ -f .envrc.local && -z "$DIRENV_LOCAL_LOADED" ]]; then
export DIRENV_LOCAL_LOADED=1
log_status ".envrc.local detected, loading..."
skip_default_envrc() {
log_status "skip_default_envrc triggered, skipping .envrc"
exit 0
}
source_env .envrc.local
use() {
log_status "intercepted 'use $@' in .envrc"
}
fi
'';
};
};
my.persist.homeDirs = [