summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup87
1 files changed, 83 insertions, 4 deletions
diff --git a/archsetup b/archsetup
index 97d6e92..0779d2b 100755
--- a/archsetup
+++ b/archsetup
@@ -825,7 +825,7 @@ user_customizations() {
dotfiles_dir="$user_archsetup_dir/dotfiles"
action="linking dotfiles into place" && display "task" "$action"
- (cd "$dotfiles_dir" && stow --target="/home/$username" --no-folding --adopt system \
+ (cd "$dotfiles_dir" && stow --target="/home/$username" --no-folding --adopt common \
>> "$logfile" 2>&1 ) || error_warn "$action" "$?"
# Stow desktop-environment-specific dotfiles
@@ -847,6 +847,11 @@ user_customizations() {
(sudo -u "$username" update-desktop-database "/home/$username/.local/share/applications" \
>> "$logfile" 2>&1 ) || true
+ # GTK file chooser settings (stored in dconf, can't be stowed)
+ action="configuring GTK file chooser" && display "task" "$action"
+ (sudo -u "$username" dbus-launch dconf write /org/gtk/settings/file-chooser/sort-directories-first true \
+ >> "$logfile" 2>&1 ) || error_warn "$action" "$?"
+
action="restoring dotfile versions" && display "task" "$action"
(cd "$dotfiles_dir" && git config --global --add safe.directory "$user_archsetup_dir" && \
git restore . >> "$logfile" 2>&1 ) || error_warn "$action" "$?"
@@ -1076,6 +1081,24 @@ EOF
action="enabling geoclue geolocation service" && display "task" "$action"
systemctl enable geoclue.service >> "$logfile" 2>&1 || error_warn "$action" "$?"
+ # Enable BeaconDB as geoclue wifi location provider (default MLS/Ichnaea API is defunct)
+ action="configuring geoclue to use BeaconDB location service" && display "task" "$action"
+ if grep -q '^#url=https://api.beacondb.net/v1/geolocate' /etc/geoclue/geoclue.conf 2>/dev/null; then
+ sed -i 's|^#url=https://api.beacondb.net/v1/geolocate|url=https://api.beacondb.net/v1/geolocate|' /etc/geoclue/geoclue.conf
+ fi
+
+ # Whitelist gammastep in geoclue config (geoclue demo agent is started via hyprland.conf exec-once)
+ action="whitelisting gammastep in geoclue" && display "task" "$action"
+ if ! grep -q "^\[gammastep\]" /etc/geoclue/geoclue.conf 2>/dev/null; then
+ cat >> /etc/geoclue/geoclue.conf << 'EOF'
+
+[gammastep]
+allowed=true
+system=false
+users=
+EOF
+ fi
+
# Fix dbus-broker race condition with sysusers (geoclue user must exist before dbus parses service files)
action="configuring dbus-broker to wait for sysusers" && display "task" "$action"
mkdir -p /etc/systemd/system/dbus-broker.service.d
@@ -1225,7 +1248,51 @@ EOF
display "task" "zfs-replicate timer created (enable after SSH key setup to TrueNAS)"
elif is_btrfs_root; then
- display "task" "btrfs filesystem detected"
+ # Btrfs: Install snapper for snapshot management
+ display "task" "btrfs detected - installing snapper and grub-btrfs"
+ pacman_install snapper
+ pacman_install grub-btrfs
+ # inotify-tools is an optional dep of grub-btrfs but required for grub-btrfsd daemon
+ pacman_install inotify-tools
+
+ action="creating snapper configuration for root" && display "task" "$action"
+ # snapper requires the .snapshots subvolume to not exist when creating config
+ # If it already exists (from manual btrfs setup), umount and remove it first
+ if mountpoint -q /.snapshots 2>/dev/null; then
+ umount /.snapshots >> "$logfile" 2>&1
+ fi
+ if [ -d /.snapshots ]; then
+ rmdir /.snapshots >> "$logfile" 2>&1 || true
+ fi
+
+ # Create snapper config (this creates /.snapshots subvolume)
+ if [ ! -f /etc/snapper/configs/root ]; then
+ snapper -c root create-config / >> "$logfile" 2>&1 || error_warn "$action" "$?"
+ else
+ display "task" "snapper root config already exists"
+ fi
+
+ action="configuring snapper retention policy" && display "task" "$action"
+ # Conservative retention - local snapshots for quick rollback
+ snapper -c root set-config "TIMELINE_CREATE=yes" >> "$logfile" 2>&1
+ snapper -c root set-config "TIMELINE_CLEANUP=yes" >> "$logfile" 2>&1
+ snapper -c root set-config "TIMELINE_LIMIT_HOURLY=5" >> "$logfile" 2>&1
+ snapper -c root set-config "TIMELINE_LIMIT_DAILY=7" >> "$logfile" 2>&1
+ snapper -c root set-config "TIMELINE_LIMIT_WEEKLY=2" >> "$logfile" 2>&1
+ snapper -c root set-config "TIMELINE_LIMIT_MONTHLY=1" >> "$logfile" 2>&1
+ snapper -c root set-config "TIMELINE_LIMIT_YEARLY=0" >> "$logfile" 2>&1
+
+ action="enabling snapper timeline timer" && display "task" "$action"
+ systemctl enable snapper-timeline.timer >> "$logfile" 2>&1 || error_warn "$action" "$?"
+ systemctl enable snapper-cleanup.timer >> "$logfile" 2>&1 || error_warn "$action" "$?"
+
+ action="enabling grub-btrfsd for boot menu snapshots" && display "task" "$action"
+ systemctl enable grub-btrfsd >> "$logfile" 2>&1 || error_warn "$action" "$?"
+
+ # Allow user to use snapper without root
+ action="allowing wheel group to use snapper" && display "task" "$action"
+ snapper -c root set-config "ALLOW_GROUPS=wheel" >> "$logfile" 2>&1 || error_warn "$action" "$?"
+
else
display "task" "ext4/other filesystem detected"
fi
@@ -1367,7 +1434,11 @@ desktop_environment() {
# Fonts
action="Fonts" && display "subtitle" "$action"
+ pacman_install cantarell-fonts
pacman_install noto-fonts-emoji
+ pacman_install ttf-caladea # Cambria replacement
+ pacman_install ttf-carlito # Calibri replacement
+ pacman_install ttf-croscore # Chrome OS fonts (Arimo, Cousine, Tinos)
pacman_install terminus-font
pacman_install ttf-firacode-nerd
pacman_install ttf-hack-nerd
@@ -1541,7 +1612,7 @@ desktop_environment() {
pacman_install "$software"
done
- for software in vimix-cursors \
+ for software in bibata-cursor-theme-bin \
papirus-icon-theme qt6ct qt5ct; do
aur_install "$software"
done
@@ -1776,6 +1847,9 @@ supplemental_software() {
pacman_install unclutter # hides mouse cursor when not being used
pacman_install vlc # media player
pacman_install w3m # text based browser
+ pacman_install mpd # music player daemon
+ pacman_install mpc # mpd command line client
+ pacman_install ncmpcpp # ncurses mpd client
pacman_install opus # opus audio codec (all music in opus format)
pacman_install wavpack # audio compression format
pacman_install webkit2gtk # web content engine for GTK
@@ -1885,7 +1959,12 @@ EOF
sed -i 's/.*GRUB_GFXMODE=auto/GRUB_GFXMODE=1024x768/' /etc/default/grub
sed -i "s/.*GRUB_RECORDFAIL_TIMEOUT=.*/GRUB_RECORDFAIL_TIMEOUT=2/g" /etc/default/grub
sed -i "s/.*GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"rw loglevel=2 rd.systemd.show_status=auto rd.udev.log_level=2 nvme.noacpi=1 mem_sleep_default=deep nowatchdog random.trust_cpu=off quiet splash\"/g" /etc/default/grub
- grub-mkconfig -o /boot/grub/grub.cfg >> "$logfile" 2>&1 || error_warn "generating grub config" "$?"
+ fi
+
+ # Regenerate GRUB config after all modifications
+ if [ -f /etc/default/grub ]; then
+ action="generating grub configuration" && display "task" "$action"
+ grub-mkconfig -o /boot/grub/grub.cfg >> "$logfile" 2>&1 || error_warn "$action" "$?"
fi
}