feat: direnv, move tool-versions to base

This commit is contained in:
2024-08-09 18:59:34 +03:00
parent 5826e35853
commit 24a5dd1ff6
6 changed files with 27 additions and 14 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use asdf

1
base/envrc Normal file
View File

@@ -0,0 +1 @@
use asdf

View File

@@ -1,29 +1,28 @@
1password-cli 2.29.0
1password-cli 2.30.0
age 1.2.0
asdf-plugin-manager 1.3.1
bottom 0.9.7
bottom 0.10.2
direnv 2.34.0
dotenv-linter 3.3.0
editorconfig-checker 2.8.0
eza 0.18.23
eza 0.19.0
fd 10.1.0
github-cli 2.53.0
golang 1.22.5
github-cli 2.54.0
golang 1.22.6
hadolint 2.12.0
kubectl 1.30.3
lazygit 0.43.1
neovim system
nodejs 22.5.1
nodejs 22.6.0
pipx 1.6.0
pre-commit 3.8.0
ripgrep 14.1.0
rust 1.79.0
rust 1.80.1
semgrep system
shellcheck 0.10.0
shfmt 3.8.0
terraform-ls 0.33.3
terraform-lsp 0.0.12
terragrunt 0.64.2
terragrunt 0.66.3
tf-summarize 0.3.10
vault 1.17.2+ent
vault 1.17.3
yamllint 1.35.1
yq 4.44.2
yq 4.44.3

View File

@@ -108,6 +108,11 @@ initialize_antidot()
fi
}
initialize_direnv()
{
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
}
main()
{
load_antigen
@@ -115,6 +120,7 @@ main()
initialize_pyenv
setup_tmux_window_name_plugin
initialize_antidot
initialize_direnv
}
main "$@"

View File

@@ -308,8 +308,6 @@ msg "Setting up asdf configuration"
export ASDF_DIR="${XDG_BIN_HOME}/asdf"
export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME}/asdf/asdfrc"
export ASDF_DATA_DIR="${ASDF_DIR}"
# This seems wrong, but `asdf info` and `versions.bash` differ on path resolution.
export ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=".config/asdf/tool-versions"
export ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME="${XDG_CONFIG_HOME}/asdf/plugin-versions"
export ASDF_LOG_FILE="${XDG_CACHE_HOME}/asdf/asdf.log"
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY="latest_available"
@@ -317,6 +315,7 @@ export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages"
export ASDF_GOLANG_MOD_VERSION_ENABLED=true
export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages"
export ASDF_CRATE_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/cargo-packages"
export ASDF_DIRENV_IGNORE_MISSING_PLUGINS=1
export PATH="${ASDF_DIR}/bin:${PATH}"
# bob manages nvim versions
@@ -343,6 +342,11 @@ export COMPOSER_HOME="$XDG_STATE_HOME/composer"
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
export PATH="$COMPOSER_BIN:$PATH"
# direnv, https://direnv.net/
# https://direnv.net/docs/hook.html
# Set the hook to show the direnv message in a different color
export DIRENV_LOG_FORMAT=$'\033[2mdirenv: %s\033[0m'
# docker, https://docs.docker.com/engine/reference/commandline/cli/
msg "Setting up Docker configuration"
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"

View File

@@ -27,6 +27,7 @@ ASDF_INSTALLABLES=(
"1password-cli:github.com/NeoHsu/asdf-1password-cli.git"
"age:github.com/threkk/asdf-age.git"
"bottom:github.com/carbonteq/asdf-btm.git"
"direnv:github.com/asdf-community/asdf-direnv.git"
"dotenv-linter:github.com/wesleimp/asdf-dotenv-linter.git"
"editorconfig-checker:github.com/gabitchov/asdf-editorconfig-checker.git"
"eza:github.com/lwiechec/asdf-eza.git"
@@ -40,6 +41,7 @@ ASDF_INSTALLABLES=(
"pipx:github.com/yozachar/asdf-pipx.git"
"pre-commit:github.com/jonathanmorley/asdf-pre-commit.git"
"ripgrep:gitlab.com/wt0f/asdf-ripgrep.git"
"rust:github.com/code-lever/asdf-rust.git"
"semgrep:github.com/brentjanderson/asdf-semgrep.git"
"shellcheck:github.com/luizm/asdf-shellcheck.git"
"shfmt:github.com/luizm/asdf-shfmt.git"