diff --git a/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl b/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl index d624e65..21c6c63 100644 --- a/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl +++ b/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-packages.tmpl @@ -3,19 +3,21 @@ # Install XCode xcode-select -p >/dev/null 2>&1 || xcode-select --install +{{- if .host.headless }} # Install Visual Studio Code curl -fsSL -o vscode.zip https://code.visualstudio.com/sha/download?build=stable\&os=darwin-universal unzip -q vscode.zip rm vscode.zip mv "Visual Studio Code.app" /Applications/ ln -s "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" /usr/local/bin/code +{{- end }} if ! command -v brew >/dev/null 2>&1; then echo "Installing Homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi -{{ if eq .host.arch "arm64" -}} +{{- if eq .host.arch "arm64" }} eval $(/opt/homebrew/bin/brew shellenv) {{- else }} eval $(/usr/local/bin/brew shellenv) diff --git a/home/.chezmoitemplates/darwin/brewfile b/home/.chezmoitemplates/darwin/brewfile index 798e2e2..446ae98 100644 --- a/home/.chezmoitemplates/darwin/brewfile +++ b/home/.chezmoitemplates/darwin/brewfile @@ -75,6 +75,7 @@ "qlstephen" "slack" "spectacle" + "visual-studio-code" -}} {{- range ($taps | sortAlpha | uniq) }} diff --git a/home/private_dot_config/zsh/dot_zshrc.tmpl b/home/private_dot_config/zsh/dot_zshrc.tmpl index b3369f7..2d63a1c 100644 --- a/home/private_dot_config/zsh/dot_zshrc.tmpl +++ b/home/private_dot_config/zsh/dot_zshrc.tmpl @@ -141,13 +141,6 @@ export NVM_DIR="$HOME/.nvm" ln -sf "$(brew --prefix)/bin/python"{3,} -{{ if eq .chezmoi.os "darwin" -}} -# Visual Studio Code Configuration -# ----------------------------------------------------------------------------- - -# Add Visual Studio Code (code) -export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" -{{- end }} # Includes # -----------------------------------------------------------------------------