Post-install tailoring section (ported from starburst minimal-fedora)
Section 8, after the advanced menu (summary renumbered to 9): - PeaZip variant by environment: peazip-common + peazip-qt6 for plasma/hyprland, peazip-common + peazip-gtk3 otherwise (all verified on F44; peazip-qt6-10.9.0-1.fc44). Resilient: warns red, continues. - Starship prompt via the official installer (command -v guarded), then the tokyo-night preset ONLY when no starship.toml exists yet — dotfiles checkouts always win over the preset. - RobotoMono Nerd Font via the existing install_nerd_font helper (modules keep installing JetBrainsMono; both are small). - Services: fstrim.timer, chronyd, NetworkManager globally-managed config (write + restart + 15s settle ONLY when the conf is absent — no needless NM restarts on re-runs, and no SSH self-drop when the config already exists), pipewire user units best-effort. Polkit agent deliberately NOT ported: solved properly by the polkit-kde user unit (VM-proven), the old polkit-kde-agent-1 line is superseded.
This commit is contained in:
@@ -563,7 +563,80 @@ if [[ "$ASSUME_YES" != "true" ]]; then
|
||||
fi
|
||||
pause_if_debug
|
||||
|
||||
step "8 Summary"
|
||||
#------------------------------------------
|
||||
# 8 Post-install tailoring
|
||||
#------------------------------------------
|
||||
# Ported from the old starburst minimal-fedora script, adapted:
|
||||
# - polkit agent handled elsewhere (polkit-kde user unit, VM-proven)
|
||||
# - resilient: each part warns red and continues (one missing package
|
||||
# must not abort a finished install)
|
||||
step "8 Post-install tailoring"
|
||||
rule
|
||||
|
||||
# --- 8.1 PeaZip: toolkit variant follows the session (Qt6 for Qt-ish
|
||||
# environments, GTK3 for the rest) ---
|
||||
info "Tailoring toolkits for DE=$DE / TWM=$TWM..."
|
||||
if [[ "$DE" == "plasma" || "$TWM" == "hyprland" ]]; then
|
||||
peazip_pkgs="peazip-common peazip-qt6"
|
||||
else
|
||||
# XFCE, GNOME, Niri, MangoWC, chadwm: lightweight/generic toolkits
|
||||
peazip_pkgs="peazip-common peazip-gtk3"
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
if ! install_packages $peazip_pkgs; then
|
||||
color_red " Failed: $peazip_pkgs"
|
||||
color_red " (continuing — PeaZip is a convenience, not a dependency)"
|
||||
fi
|
||||
pause_if_debug
|
||||
|
||||
# --- 8.2 Starship prompt + Tokyo Night preset ---
|
||||
if ! command -v starship >/dev/null 2>&1; then
|
||||
info "Installing Starship shell prompt..."
|
||||
# starship's official installer; -y skips its confirmation
|
||||
if ! curl -sS https://starship.rs/install.sh | sh -s -- -y; then
|
||||
color_red " Failed: starship installer"
|
||||
color_red " (continuing)"
|
||||
fi
|
||||
fi
|
||||
# Preset only when the user has no config yet — never clobber existing
|
||||
# configuration (which may arrive via the dotfiles checkout).
|
||||
if command -v starship >/dev/null 2>&1 && [[ ! -f "$HOME/.config/starship.toml" ]]; then
|
||||
info "Applying starship tokyo-night preset..."
|
||||
mkdir -p "$HOME/.config"
|
||||
starship preset tokyo-night -o "$HOME/.config/starship.toml" \
|
||||
|| warn "Could not apply the preset (starship still installed)."
|
||||
fi
|
||||
pause_if_debug
|
||||
|
||||
# --- 8.3 RobotoMono Nerd Font (the modules install JetBrainsMono) ---
|
||||
install_nerd_font RobotoMono
|
||||
pause_if_debug
|
||||
|
||||
# --- 8.4 Services ---
|
||||
info "Enabling services..."
|
||||
sudo systemctl enable --now fstrim.timer
|
||||
sudo systemctl enable --now chronyd || true
|
||||
|
||||
info "Ensuring NetworkManager manages all devices..."
|
||||
NM_CONF="/etc/NetworkManager/conf.d/10-globally-managed-devices.conf"
|
||||
if [[ ! -f "$NM_CONF" ]]; then
|
||||
sudo mkdir -p "$(dirname "$NM_CONF")"
|
||||
printf '[ifupdown]\nmanaged=true\n\n[keyfile]\nunmanaged-devices=\n' \
|
||||
| sudo tee "$NM_CONF" >/dev/null
|
||||
sudo systemctl enable --now NetworkManager
|
||||
sudo systemctl restart NetworkManager
|
||||
warn "NetworkManager restarted; giving it 15s to settle..."
|
||||
sleep 15
|
||||
else
|
||||
ok "NetworkManager already globally-managed (config present)."
|
||||
fi
|
||||
|
||||
# pipewire user units: preset-enabled on install; enable explicitly for
|
||||
# robustness (fails harmlessly in odd session contexts, hence || true)
|
||||
systemctl --user enable pipewire pipewire-pulse wireplumber >/dev/null 2>&1 || true
|
||||
pause_if_debug
|
||||
|
||||
step "9 Summary"
|
||||
rule
|
||||
|
||||
# Post-install wiring that must see the FINAL package state. The libvirt
|
||||
|
||||
Reference in New Issue
Block a user