updated dotfiles, fixed install scripts, added missing packages
This commit is contained in:
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
# run_once_50-configure-system.sh
|
||||
# System-level config, enable services and set some settings
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SYS="{{ .system | default "desktop" }}"
|
||||
DISTRO_ID="{{ .chezmoi.osRelease.id | default "" }}"
|
||||
SRC="{{ .chezmoi.sourceDir }}"
|
||||
echo ">>> [configure] distro=$DISTRO_ID, system=$SYS, source=$SRC"
|
||||
|
||||
services=(
|
||||
bluetooth
|
||||
cups
|
||||
greetd
|
||||
)
|
||||
|
||||
case "$DISTRO_ID" in
|
||||
arch)
|
||||
if [ "$SYS" != "server" ]; then
|
||||
echo ">>> [configure] enabling services"
|
||||
for service in "${services[@]}"; do
|
||||
if sudo systemctl enable "$service"; then
|
||||
echo "✓ $service: success"
|
||||
else
|
||||
echo "✗ $service: failed"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ">>> [configure] applying grub-theme"
|
||||
if [ -d /boot/grub/themes ]; then
|
||||
sudo mkdir -p /boot/grub/themes/minegrub
|
||||
sudo cp -r "$SRC/assets/minegrub/." /boot/grub/themes/minegrub/
|
||||
if ! grep -q '^GRUB_THEME=' /etc/default/grub 2>/dev/null; then
|
||||
echo 'GRUB_THEME="/boot/grub/themes/minegrub/theme.txt"' \
|
||||
| sudo tee -a /etc/default/grub >/dev/null
|
||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||
fi
|
||||
else
|
||||
echo ">>> [configure] /boot/grub/themes missing — skipping grub theme install"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
ubuntu)
|
||||
echo ">>> [configure] ubuntu no configure system"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo ">>> [configure] unsupported distro: ${DISTRO_ID:-unknown}, skipping"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ">>> [configure] done"
|
||||
Reference in New Issue
Block a user