bos/iso/post-install.sh
Claude 0ff3998c84 Scaffold BOS repo: dotfiles, ISO profile, and bos-settings GTK4 app
Implements all four components from the BOS spec:
- dotfiles/: default Hyprland, bread, breadbox, breadcrumbs configs
- iso/: archiso profiledef, package list, Calamares YAML modules, post-install.sh
- bos-settings/: Cargo workspace with GTK4 settings app (8 views: snapshots,
  packages, bread, breadbar, breadbox, breadcrumbs, breadpad, hyprland)

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

40 lines
1.4 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 use snapper 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 ---
if command -v bakery &>/dev/null; then
sudo -u "$MAIN_USER" bakery install bread breadbar breadbox breadcrumbs breadpad bos-settings
fi
# --- Deploy dotfiles (skip existing files) ---
DOTFILES_SRC="/etc/skel/.config"
DOTFILES_DEST="/home/$MAIN_USER/.config"
if [[ -d "$DOTFILES_SRC" ]]; then
mkdir -p "$DOTFILES_DEST"
cp -rn "$DOTFILES_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."