Add Gentoo support with GURU overlay requirement
Tadbit (tadbit-gentoo, x86_64, gcc 15.2.1, TKG kernel) joins the
homelab as the 7th machine — the first gentoo box. Adds Gentoo
support to the bootstrap alongside arch and debian.
New scripts:
- run_once_10-add-gentoo-overlays.sh.tmpl: enables GURU overlay
via 'eselect repository enable guru' + 'emaint sync -r guru'.
Idempotent — skips if GURU is already at /var/db/repos/guru.
GURU is required because eza, lazygit, topgrade, and most modern
CLI tools only live in GURU (not main).
- run_once_20-install-user-packages-gentoo.sh.tmpl: emerge-based
user package set. Writes USE flags to package.use/ BEFORE
emerging so foot/wofi/waybar get the right features. Detects
missing packages via 'command -v <basename>'. Falls back to
the official curl installer for bun (no gentoo package).
- run_once_40-install-sway-gentoo.sh.tmpl: sway stack via emerge
with USE flags for X+wayland+tray+upower+wireplumber.
Updated scripts:
- .chezmoi.yaml.tmpl: os_family detection now also matches 'gentoo'.
Critical fix: Gentoo's /etc/os-release uses single-quoted values
('gentoo' not 'gentoo' or "gentoo"), and chezmoi's parser doesn't
strip them. Without trimAll "'", .chezmoi.osRelease.id returns
the literal string 'gentoo' with quotes, and the eq test fails.
Symptom: os_family silently becomes 'unknown'.
- run_once_00-install-bootstrap-tools.sh.tmpl: added gentoo branch
that uses emerge --sync + emerge (skipping if tree is < 1 day old).
- run_onchange_30-ensure-cargo.sh.tmpl: added gentoo branch for
bat (already installed by emerge, just verify), topgrade (GURU),
cargo-update (dev-util/cargo-update in main).
README: documented Gentoo-specific quirks (USE flags, GURU,
single-quote parsing, no binary packages).
This commit is contained in:
parent
1b596bd894
commit
36e9d3e0ce
7 changed files with 439 additions and 12 deletions
|
|
@ -3,10 +3,19 @@
|
|||
{{- if hasKey .chezmoi.osRelease "idLike" -}}
|
||||
{{- $idLike = .chezmoi.osRelease.idLike -}}
|
||||
{{- end -}}
|
||||
{{- if or (eq .chezmoi.osRelease.id "arch") (contains "arch" $idLike) -}}
|
||||
{{- $osId := .chezmoi.osRelease.id -}}
|
||||
{{- /* Gentoo's /etc/os-release uses single-quoted values (e.g. ID='gentoo'),
|
||||
and the parser doesn't strip them, so strip here. Other distros use
|
||||
double-quoted or unquoted values which the parser handles. */ -}}
|
||||
{{- if hasPrefix "'" $osId -}}
|
||||
{{- $osId = trimAll "'" $osId -}}
|
||||
{{- end -}}
|
||||
{{- if or (eq $osId "arch") (contains "arch" $idLike) -}}
|
||||
{{- $osFamily = "arch" -}}
|
||||
{{- else if or (eq .chezmoi.osRelease.id "debian") (contains "debian" $idLike) -}}
|
||||
{{- else if or (eq $osId "debian") (contains "debian" $idLike) -}}
|
||||
{{- $osFamily = "debian" -}}
|
||||
{{- else if eq $osId "gentoo" -}}
|
||||
{{- $osFamily = "gentoo" -}}
|
||||
{{- end -}}
|
||||
encryption: "age"
|
||||
# chezmoi's builtin age implementation requires a TTY for passphrase-style
|
||||
|
|
@ -71,7 +80,7 @@ age:
|
|||
|
||||
data:
|
||||
os_family: {{ $osFamily | quote }}
|
||||
os_id: {{ .chezmoi.osRelease.id | quote }}
|
||||
os_id: {{ $osId | quote }}
|
||||
|
||||
# Sway/Wayland desktop stack — opt-in at bootstrap time. When you
|
||||
# run `chezmoi init` for the first time, you'll be asked:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue