summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
Diffstat (limited to 'archsetup')
-rwxr-xr-xarchsetup74
1 files changed, 71 insertions, 3 deletions
diff --git a/archsetup b/archsetup
index e5ab2e7..790e966 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
@@ -1081,6 +1081,18 @@ EOF
action="enabling geoclue geolocation service" && display "task" "$action"
systemctl enable geoclue.service >> "$logfile" 2>&1 || error_warn "$action" "$?"
+ # Whitelist gammastep in geoclue (prevents "unable to obtain geoclue client path" error)
+ 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
@@ -1230,7 +1242,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
@@ -1372,7 +1428,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
@@ -1781,6 +1841,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
@@ -1890,7 +1953,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
}