Post-install tailoring (PeaZip variants, starship+preset, RobotoMono, services) #13
@@ -563,7 +563,80 @@ if [[ "$ASSUME_YES" != "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
pause_if_debug
|
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
|
rule
|
||||||
|
|
||||||
# Post-install wiring that must see the FINAL package state. The libvirt
|
# Post-install wiring that must see the FINAL package state. The libvirt
|
||||||
|
|||||||
Reference in New Issue
Block a user