# HG changeset patch # User zegervdv # Date 1664258105 0 # Node ID fdce323431f4f4e3183009a2f8ad64462484f35d # Parent b137de67217b0982c9dea4969672f6ded9e1c050 Add asdf and config for python, neovim and direnv diff -r b137de67217b -r fdce323431f4 .chezmoiscripts/run_onchange_after_10-install-brew-packages.sh.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.chezmoiscripts/run_onchange_after_10-install-brew-packages.sh.tmpl Tue Sep 27 05:55:05 2022 +0000 @@ -0,0 +1,8 @@ +{{ if (or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin")) -}} +#!/usr/bin/env bash + +# Brewfile hash: {{ include "dot_Brewfile" | sha256sum }} + +brew bundle --global + +{{ end -}} diff -r b137de67217b -r fdce323431f4 .chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl Tue Sep 27 05:55:05 2022 +0000 @@ -0,0 +1,21 @@ +{{ if (or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin")) -}} +#!/usr/bin/env bash + +# asdf globals tools hash: {{ include "dot_tool-versions" | sha256sum }} + +asdf_plugin_add() { + if ! asdf plugin-list | grep -Fq "$1" + then + asdf plugin-add "$1" + else + echo "asdf plugin $1 already installed" + fi +} + +asdf_plugin_add python +asdf_plugin_add neovim +asdf_plugin_add direnv + +asdf install + +{{ end -}} diff -r b137de67217b -r fdce323431f4 dot_Brewfile --- a/dot_Brewfile Mon Sep 26 14:26:48 2022 +0000 +++ b/dot_Brewfile Tue Sep 27 05:55:05 2022 +0000 @@ -9,12 +9,10 @@ brew "chezmoi" brew "mercurial" brew "mosh", args: ["HEAD"] -brew "neovim", args: ["HEAD"] brew "ripgrep" brew "scc" brew "universal-ctags/universal-ctags/universal-ctags", args: ["HEAD"] brew "fzf" -brew "direnv" brew "stylua" brew "shellcheck" brew "jq" @@ -26,3 +24,4 @@ brew "git" brew "zegervdv/tools/cbfmt" brew "pass" +brew "asdf" diff -r b137de67217b -r fdce323431f4 dot_default-python-packages --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_default-python-packages Tue Sep 27 05:55:05 2022 +0000 @@ -0,0 +1,1 @@ +poetry diff -r b137de67217b -r fdce323431f4 dot_tool-versions --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_tool-versions Tue Sep 27 05:55:05 2022 +0000 @@ -0,0 +1,2 @@ +python 3.10.7 +neovim ref:master diff -r b137de67217b -r fdce323431f4 dot_zshrc --- a/dot_zshrc Mon Sep 26 14:26:48 2022 +0000 +++ b/dot_zshrc Tue Sep 27 05:55:05 2022 +0000 @@ -234,6 +234,16 @@ export PS_FORMAT='pid,pgid,state,start_time,%cpu,command' +if command -v brew &> /dev/null +then + source $(brew --prefix asdf)/libexec/asdf.sh +fi + +if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc" ] +then + source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc" +fi + [ -f ~/.zshrc.local ] && source ~/.zshrc.local # Must run after brew is loaded