diff --git a/run_once_20-install-user-packages-gentoo.sh.tmpl b/run_once_20-install-user-packages-gentoo.sh.tmpl index 21f8f71..083ce22 100644 --- a/run_once_20-install-user-packages-gentoo.sh.tmpl +++ b/run_once_20-install-user-packages-gentoo.sh.tmpl @@ -24,6 +24,7 @@ die() { printf '\033[1;31m[packages ERROR]\033[0m %s\n' "$*" >&2; exit 1; } USER_HOME="${HOME:-$(eval echo "~$(whoami)")}" ZSH_CUSTOM="${ZSH_CUSTOM:-$USER_HOME/.oh-my-zsh/custom}" +{{ if eq .os_family "gentoo" -}} # ----------------------------- GENTOO --------------------------------------- # On gentoo, `emerge` is the only PM (plus the GURU overlay for some # packages). Many of the user packages live in GURU, so we run emerge with @@ -290,4 +291,8 @@ fi log "all user packages installed" zsh --version nvim --version | head -1 -tmux -V \ No newline at end of file +tmux -V +{{ else -}} +# Not a gentoo box — nothing to do (guarded by os_family above). +log "skipping gentoo user-packages (os_family={{ .os_family }}, not gentoo)" +{{ end -}} \ No newline at end of file diff --git a/run_once_40-install-sway-gentoo.sh.tmpl b/run_once_40-install-sway-gentoo.sh.tmpl index 436dcd1..e965d65 100644 --- a/run_once_40-install-sway-gentoo.sh.tmpl +++ b/run_once_40-install-sway-gentoo.sh.tmpl @@ -12,6 +12,7 @@ set -euo pipefail log() { printf '\033[1;34m[sway]\033[0m %s\n' "$*"; } +{{ if eq .os_family "gentoo" -}} # --- 0. Gate on .sway_setup --- {{ if not .sway_setup -}} log "sway_setup not enabled for this host (.sway_setup=false). Skipping." @@ -87,4 +88,8 @@ mkdir -p ~/.config/chezmoi/features touch ~/.config/chezmoi/features/sway log "marked box: ~/.config/chezmoi/features/sway" -log "sway stack install complete" \ No newline at end of file +log "sway stack install complete" +{{ else -}} +# Not a gentoo box — nothing to do (guarded by os_family above). +log "skipping gentoo sway install (os_family={{ .os_family }}, not gentoo)" +{{ end -}} \ No newline at end of file