Standalone, cross-platform, default on. No data flag — if you apply these dotfiles you probably want gcloud.
Changes
$macosSpecific
Add:
google-cloud-sdk # brew cask
(brew installs it as a cask; ensure the install script's cask handling path covers it.)
Linux: new run_onchange_install-gcloud-repo.sh.tmpl
Runs before the main apt install so google-cloud-cli is available to apt:
# Add Google Cloud SDK apt source + keyring (idempotent)
if [ ! -f /etc/apt/sources.list.d/google-cloud-sdk.list ]; then
sudo install -d -m 0755 /usr/share/keyrings
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
| sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \
| sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list
sudo apt-get update
fi
$linuxSpecific / $linuxWithDocker / $linuxWithoutDocker
Add google-cloud-cli.
dot_zshrc
gcloud's apt and brew installs both configure PATH + completions automatically. Nothing needed in zshrc unless we want to explicitly source the completion file — probably not necessary.
dot_local/bin/executable_sysup — doctor entries
tools_pm: add gcloud.
get_version(): case for gcloud --version | head -1.
Verification checklist
Explicit non-goals
- No
gcloud auth scaffolding — that's per-user/per-project, not dotfiles territory.
- No opt-out flag. If machines turn up that shouldn't have gcloud, we'll add
install_gcloud=true then, not pre-emptively.
Related
Standalone, cross-platform, default on. No data flag — if you apply these dotfiles you probably want gcloud.
Changes
$macosSpecificAdd:
(brew installs it as a cask; ensure the install script's cask handling path covers it.)
Linux: new
run_onchange_install-gcloud-repo.sh.tmplRuns before the main apt install so
google-cloud-cliis available to apt:$linuxSpecific/$linuxWithDocker/$linuxWithoutDockerAdd
google-cloud-cli.dot_zshrcgcloud's apt and brew installs both configure PATH + completions automatically. Nothing needed in zshrc unless we want to explicitly source the completion file — probably not necessary.
dot_local/bin/executable_sysup— doctor entriestools_pm: addgcloud.get_version(): case forgcloud --version | head -1.Verification checklist
chezmoi execute-templaterenders cleanly on both platforms.chezmoi apply --dry-runon a fresh Ubuntu/Pop VM shows the Google apt repo being added beforeapt-get install google-cloud-cli.sysup doctorshowsgcloudwith version after apply.brew list --cask google-cloud-sdkshows installed after apply.Explicit non-goals
gcloud authscaffolding — that's per-user/per-project, not dotfiles territory.install_gcloud=truethen, not pre-emptively.Related