1
0
This commit is contained in:
2025-08-14 11:18:03 +02:00
parent f036cbb710
commit d1ec51902e
5 changed files with 29 additions and 14 deletions

View File

@@ -0,0 +1,51 @@
#!{{ lookPath "bash" }}
# title
title="ASDF configuration"
# include lib
. ${CHEZMOI_WORKING_TREE}/scripts/utils.sh
# Plugins to install
declare -A plugins
plugins=(
['direnv']=''
['starship']=''
['golang']='https://github.com/asdf-community/asdf-golang.git'
['nodejs']='https://github.com/asdf-vm/asdf-nodejs.git'
['opam']='https://github.com/asdf-community/asdf-opam.git'
['ruby']='https://github.com/asdf-vm/asdf-ruby.git'
['rust']='https://github.com/code-lever/asdf-rust.git'
['julia']='https://github.com/rkyleg/asdf-julia.git'
['r']='https://github.com/asdf-community/asdf-r.git'
)
### Install ASDF plugins ###
log "Begin ${title}"
inf "installing direnv with system version..."
# no need to run asdf direnv setup --shell zsh --version latest
# as it is managed by zim module
for plugin in ${!plugins[@]}; do
inf "installing ${plugin}..."
asdf plugin add ${plugin} ${plugins[$plugin]}
asdf install ${plugin} latest
asdf set ${plugin} latest
asdf reshim ${plugin}
done
inf "installing python..."
asdf plugin add python https://github.com/asdf-community/asdf-python.git
asdf install python latest:3.12
asdf set python latest:3.12
asdf reshim python
inf "initializing opam..."
opam init -n
log "${title} done"