updated scripts: better warn messages, added/updated dotfiles

This commit is contained in:
2026-08-03 03:51:23 +02:00
parent 9f2b05b0a1
commit d359c751be
11 changed files with 145 additions and 14 deletions
+16
View File
@@ -4,9 +4,12 @@
set -euo pipefail
warn() { echo ">>> [configure] WARNING: $*" >&2; }
SYS="{{ .system | default "desktop" }}"
DISTRO_ID="{{ .chezmoi.osRelease.id | default "" }}"
SRC="{{ .chezmoi.sourceDir }}"
OS_PROBER="{{ .os_prober | default false }}"
echo ">>> [configure] distro=$DISTRO_ID, system=$SYS, source=$SRC"
services=(
@@ -39,6 +42,19 @@ case "$DISTRO_ID" in
else
echo ">>> [configure] /boot/grub/themes missing — skipping grub theme install"
fi
if [ "$OS_PROBER" = "true" ]; then
echo ">>> [configure] enabling GRUB os-prober"
sudo sed -i -E 's/^#?GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=false/' /etc/default/grub
if ! grep -q '^GRUB_DISABLE_OS_PROBER=' /etc/default/grub; then
echo 'GRUB_DISABLE_OS_PROBER=false' | sudo tee -a /etc/default/grub >/dev/null
fi
echo ">>> [configure] grub.cfg regenerating with os-prober entries"
sudo grub-mkconfig -o /boot/grub/grub.cfg \
|| warn "grub-mkconfig failed (os-prober entries may not be applied)"
else
echo ">>> [configure] GRUB os-prober disabled (per user choice)"
fi
fi
;;