bos/iso/airootfs/etc/calamares/post-install.sh
Claude d5913da277 Fix all issues from code/UX review
ISO structural:
- Move post-install.sh → airootfs/etc/calamares/ (it was never in the squashfs)
- Create airootfs/etc/skel/.config/ with all dotfiles (deploy path now works)
- Add iso/pacman.conf with [breadway] custom repo stub for calamares + bakery
- Add Calamares branding component (bos/branding.desc + show.qml)
- Add missing unpackfs.conf and mount.conf modules
- Add live-session autostart: getty autologin → bash_profile → Hyprland → calamares
- Add polkit rule for wheel-group snapper rollback (pkexec path)
- Remove wlroots from packages (bundled with Hyprland); add bakery to package list
- Fix modules-search path in settings.conf

Dotfiles:
- Rename dotfiles/hyprland/ → dotfiles/hypr/ (Hyprland reads ~/.config/hypr/)
- Fix deprecated shadow options: drop_shadow/shadow_range → shadow { } block

bos-settings Rust:
- Replace glib::MainContext::channel (removed in glib 0.19) with async_channel
- Stream bakery update output line-by-line instead of buffering all at once
- Fix zombie processes: per-package update buttons now wait() in a thread
- Fix sidebar/stack mismatch at startup: select snapshots row to match default view
- Replace deprecated MessageDialog with AlertDialog (GTK 4.10+) throughout
- Use pkexec for snapper rollback so polkit handles privilege escalation
- Add confirmation dialog before delete snapshot (was missing, rollback had one)
- Add refresh button + repopulate after delete in snapshots view
- Add "Saved" / "Error: …" status label to every config view save button
- Add "Remove" buttons to breadbox contexts and breadcrumbs profiles
- Remove hardcoded model string from breadpad defaults
- Drop unused state mod; fix config_dir HOME fallback; fix zombie in editor launches

https://claude.ai/code/session_01WszGHvCmxgcyTwNSkfLF9P
2026-06-12 13:45:00 +00:00

41 lines
1.5 KiB
Bash

#!/bin/bash
set -euo pipefail
# --- Snapper root config ---
snapper -c root create-config /
sed -i 's/TIMELINE_CREATE="yes"/TIMELINE_CREATE="no"/' /etc/snapper/configs/root
sed -i 's/NUMBER_CLEANUP="no"/NUMBER_CLEANUP="yes"/' /etc/snapper/configs/root
sed -i 's/NUMBER_MIN_AGE="[^"]*"/NUMBER_MIN_AGE="1800"/' /etc/snapper/configs/root
sed -i 's/NUMBER_LIMIT="[^"]*"/NUMBER_LIMIT="10"/' /etc/snapper/configs/root
sed -i 's/NUMBER_LIMIT_IMPORTANT="[^"]*"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/root
# Allow main user to list/create/delete snapshots without sudo
MAIN_USER=$(getent passwd 1000 | cut -d: -f1)
sed -i "s/ALLOW_USERS=\"\"/ALLOW_USERS=\"$MAIN_USER\"/" /etc/snapper/configs/root
# --- System services ---
systemctl enable NetworkManager
systemctl enable bluetooth
systemctl enable snapper-cleanup.timer
systemctl enable grub-btrfs.path
# --- Bakery: install bread ecosystem ---
# Requires [breadway] repo in /etc/pacman.conf — see iso/pacman.conf
if command -v bakery &>/dev/null; then
sudo -u "$MAIN_USER" bakery install bread breadbar breadbox breadcrumbs breadpad bos-settings
fi
# --- Deploy dotfiles into user home (skip any file that already exists) ---
SKEL_SRC="/etc/skel/.config"
DOTFILES_DEST="/home/$MAIN_USER/.config"
if [[ -d "$SKEL_SRC" ]]; then
mkdir -p "$DOTFILES_DEST"
cp -rn "$SKEL_SRC/." "$DOTFILES_DEST/"
chown -R "$MAIN_USER:$MAIN_USER" "$DOTFILES_DEST"
fi
# --- XDG user dirs ---
sudo -u "$MAIN_USER" xdg-user-dirs-update
echo "BOS post-install complete. Reboot to start your system."