diff --git a/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_5-install-homebrew.tmpl b/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_5-install-homebrew.tmpl similarity index 100% rename from .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_5-install-homebrew.tmpl rename to .local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_5-install-homebrew.tmpl diff --git a/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_8-install-zx.tmpl b/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_8-install-zx.tmpl similarity index 78% rename from .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_8-install-zx.tmpl rename to .local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_8-install-zx.tmpl index 55c0f140..936a7fa3 100644 --- a/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_8-install-zx.tmpl +++ b/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_8-install-zx.tmpl @@ -50,4 +50,15 @@ if ! command -v zx > /dev/null; then else logg '`zx` is already installed' fi + +### Ensure recent version of Node.js is being used +if command -v volta > /dev/null; then + if ! test "$(node --version | sed 's/^v//' | awk '{print $1}' | awk -F'.' ' ( $1 > 15) ')"; then + volta install node@latest + else + logg info 'Node.js appears to meet the minimum version requirements' + fi +else + logg warn 'Volta is not installed' +fi {{ end -}} \ No newline at end of file diff --git a/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_20-ensure-user-group.tmpl b/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_20-ensure-user-group.tmpl index 28ce8e48..f9efdadd 100644 --- a/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_20-ensure-user-group.tmpl +++ b/.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_20-ensure-user-group.tmpl @@ -3,6 +3,6 @@ {{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/logg" }} -### Ensure user has group of same name +### Ensure user has group of same name (required for Macports) logg info 'Ensuring user has a group with the same name and that it is a member. Sudo privileges may be required' echo y | sudo dseditgroup -o create "$USER" > /dev/null diff --git a/.local/share/chezmoi/home/.chezmoitemplates/darwin/Brewfile b/.local/share/chezmoi/home/.chezmoitemplates/darwin/Brewfile index dd05ae28..47ab4644 100644 --- a/.local/share/chezmoi/home/.chezmoitemplates/darwin/Brewfile +++ b/.local/share/chezmoi/home/.chezmoitemplates/darwin/Brewfile @@ -5,20 +5,6 @@ tap "homebrew/core" tap "homebrew/bundle" -# @brew [asdf](https://github.com/asdf-vm/asdf) - Version manager with support for many languages -brew "asdf" -# @brew [jq](https://stedolan.github.io/jq/) - Lightweight and flexible command-line JSON processor -brew "jq" -# @brew [node](https://nodejs.org/) - A JavaScript engine, based on the ultra fast V8-engine -brew "node" -# @brew [task](https://github.com/go-task/homebrew-tap) - A parallel task runner -tap "go-task/tap" -brew "go-task/tap/go-task" -# @brew [volta](https://volta.sh/) - Node version manager -brew "volta" -# @brew [yq](https://github.com/mikefarah/yq) - Process and manipulate YAML documents -brew "yq" -# @brew [coreutils](https://www.gnu.org/software/coreutils) - A suite of basic UNIX tools published to improve compatibility between Linux and macOS scripts if OS.mac? brew "coreutils" brew "findutils" @@ -31,10 +17,15 @@ if OS.mac? brew "grep" brew "m-cli" end -# Required for GPG encryption -brew "gnupg" -# Required for logging (already installed but installing again so Homebrew can manage them) +brew "age" +brew "asdf" brew "glow" +brew "gnupg" brew "gum" -# Required for improved, customizable installer map defined in .chezmoidata.yaml +brew "jq" +brew "node" +tap "go-task/tap" +brew "go-task/tap/go-task" +brew "volta" +brew "yq" brew "zx"