From 1d5f54ddb73d4d5406953c62f7b0c49247256342 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 29 Nov 2025 21:27:26 +0000 Subject: [PATCH 1/2] Extract target system packages to separate config file Create archiso/target-packages.x86_64 for packages installed on target: - Easier to edit without modifying installer script - Validated by GitHub Actions alongside live ISO packages - Consistent with how packages.x86_64 manages live ISO packages - Fixed exfat-utils -> exfatprogs (deprecated package) Changes: - Add archiso/target-packages.x86_64 with categorized package list - Update installer.sh to read packages from file instead of hardcoded list - Update build-iso.sh, build-docker.sh to copy package list to ISO - Update GitHub Actions to validate both package lists --- .github/workflows/build-iso.yml | 32 ++++++++-- archiso/airootfs/usr/local/bin/installer.sh | 22 +++---- archiso/target-packages.x86_64 | 70 +++++++++++++++++++++ build-docker.sh | 3 + build-iso.sh | 3 + 5 files changed, 113 insertions(+), 17 deletions(-) create mode 100644 archiso/target-packages.x86_64 diff --git a/.github/workflows/build-iso.yml b/.github/workflows/build-iso.yml index cc05e04..2969809 100644 --- a/.github/workflows/build-iso.yml +++ b/.github/workflows/build-iso.yml @@ -42,13 +42,16 @@ jobs: pacman -Syu --noconfirm --disable-download-timeout pacman -S --noconfirm --disable-download-timeout archiso git sudo grub - - name: Validate package list + - name: Validate package lists run: | echo "Ensuring package databases are synchronized..." pacman -Sy - echo "" - echo "Validating packages in archiso/packages.x86_64..." + INVALID_PACKAGES="" + + # Validate live ISO packages + echo "" + echo "Validating packages in archiso/packages.x86_64 (live ISO)..." while IFS= read -r package; do # Skip empty lines and comments if [[ -z "$package" ]] || [[ "$package" =~ ^# ]]; then @@ -64,12 +67,30 @@ jobs: fi done < archiso/packages.x86_64 + # Validate target system packages + echo "" + echo "Validating packages in archiso/target-packages.x86_64 (installed system)..." + while IFS= read -r package; do + # Skip empty lines and comments + if [[ -z "$package" ]] || [[ "$package" =~ ^# ]]; then + continue + fi + + # Check if package exists in repositories + if ! pacman -Si "$package" &>/dev/null; then + echo "❌ Invalid package: $package" + INVALID_PACKAGES="$INVALID_PACKAGES $package" + else + echo "✓ Valid package: $package" + fi + done < archiso/target-packages.x86_64 + if [[ -n "$INVALID_PACKAGES" ]]; then echo "" echo "ERROR: The following packages were not found in the repositories:" echo "$INVALID_PACKAGES" echo "" - echo "Please fix the package names in archiso/packages.x86_64" + echo "Please fix the package names in the package lists" exit 1 fi @@ -84,6 +105,9 @@ jobs: cp dot_bashrc archiso/airootfs/root/dotfiles/ cp .chezmoi.toml.tmpl archiso/airootfs/root/dotfiles/ + # Copy target package list for installer + cp archiso/target-packages.x86_64 archiso/airootfs/root/ + # Create auto-login service mkdir -p archiso/airootfs/etc/systemd/system/getty@tty1.service.d cat > archiso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF diff --git a/archiso/airootfs/usr/local/bin/installer.sh b/archiso/airootfs/usr/local/bin/installer.sh index d750d96..d56ebc9 100644 --- a/archiso/airootfs/usr/local/bin/installer.sh +++ b/archiso/airootfs/usr/local/bin/installer.sh @@ -392,19 +392,15 @@ EOCHROOT install_hyprland() { print_step "Installing Hyprland environment" - arch-chroot "$MOUNT_POINT" pacman -S --noconfirm \ - hyprland xdg-desktop-portal-hyprland polkit-kde-agent \ - qt5-wayland qt6-wayland glfw \ - waybar rofi mako swaybg \ - grim slurp wl-clipboard cliphist brightnessctl \ - pipewire pipewire-alsa pipewire-jack pipewire-pulse wireplumber \ - pamixer \ - ghostty firefox nautilus gvfs \ - ttf-jetbrains-mono-nerd \ - papirus-icon-theme \ - chezmoi starship btop wget curl rsync unzip zip \ - man-db which tree less cryptsetup lvm2 \ - btrfs-progs dosfstools e2fsprogs exfat-utils ntfs-3g mesa + # Read packages from target-packages.x86_64, filtering comments and empty lines + local packages="" + while IFS= read -r line; do + # Skip empty lines and comments + [[ -z "$line" || "$line" =~ ^[[:space:]]*# ]] && continue + packages="$packages $line" + done < /root/target-packages.x86_64 + + arch-chroot "$MOUNT_POINT" pacman -S --noconfirm $packages print_success "Hyprland environment installed" } diff --git a/archiso/target-packages.x86_64 b/archiso/target-packages.x86_64 new file mode 100644 index 0000000..e2658b9 --- /dev/null +++ b/archiso/target-packages.x86_64 @@ -0,0 +1,70 @@ +# Packages to install on the target system +# This file is read by the installer during installation +# Lines starting with # are comments, empty lines are ignored + +# Wayland/Hyprland +hyprland +xdg-desktop-portal-hyprland +polkit-kde-agent +qt5-wayland +qt6-wayland +glfw + +# Desktop components +waybar +rofi +mako +swaybg +grim +slurp +wl-clipboard +cliphist +brightnessctl + +# Audio +pipewire +pipewire-alsa +pipewire-jack +pipewire-pulse +wireplumber +pamixer + +# Terminal and shell +ghostty +starship + +# Fonts +ttf-jetbrains-mono-nerd + +# Theme +papirus-icon-theme + +# Applications +firefox +nautilus +gvfs + +# System tools +chezmoi +btop +wget +curl +rsync +unzip +zip +man-db +which +tree +less + +# Disk/encryption tools +cryptsetup +lvm2 +btrfs-progs +dosfstools +e2fsprogs +exfatprogs +ntfs-3g + +# Graphics +mesa diff --git a/build-docker.sh b/build-docker.sh index c3d2f7c..81639b1 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -74,6 +74,9 @@ cp -r dot_config archiso/airootfs/root/dotfiles/ 2>/dev/null || true cp dot_bashrc archiso/airootfs/root/dotfiles/ 2>/dev/null || true cp .chezmoi.toml.tmpl archiso/airootfs/root/dotfiles/ 2>/dev/null || true +# Copy target package list for installer +cp archiso/target-packages.x86_64 archiso/airootfs/root/ + # Create auto-login service mkdir -p archiso/airootfs/etc/systemd/system/getty@tty1.service.d cat > archiso/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF diff --git a/build-iso.sh b/build-iso.sh index c2102c5..f654d92 100644 --- a/build-iso.sh +++ b/build-iso.sh @@ -48,6 +48,9 @@ cp -r "$SCRIPT_DIR/dot_config" "$PROFILE_DIR/airootfs/root/dotfiles/" cp "$SCRIPT_DIR/dot_bashrc" "$PROFILE_DIR/airootfs/root/dotfiles/" cp "$SCRIPT_DIR/.chezmoi.toml.tmpl" "$PROFILE_DIR/airootfs/root/dotfiles/" +# Copy target package list for installer +cp "$PROFILE_DIR/target-packages.x86_64" "$PROFILE_DIR/airootfs/root/" + # Create auto-login service print_step "Creating auto-login service" mkdir -p "$PROFILE_DIR/airootfs/etc/systemd/system/getty@tty1.service.d" From f2e93c326b4df0d066898bdff64bf495a6ffedbf Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 29 Nov 2025 21:30:50 +0000 Subject: [PATCH 2/2] Switch to polkit-gnome and add gnome-keyring with auto-unlock Package changes: - Replace polkit-kde-agent with polkit-gnome - Add gnome-keyring and libsecret for secrets management Installer changes: - Configure PAM to auto-unlock gnome-keyring on login - Keyring password synced with user login password Hyprland config: - Update polkit agent path to polkit-gnome - Start gnome-keyring-daemon with secrets, pkcs11, ssh components - Set SSH_AUTH_SOCK for SSH agent integration --- archiso/airootfs/usr/local/bin/installer.sh | 5 +++++ archiso/target-packages.x86_64 | 6 +++++- dot_config/hypr/hyprland.conf | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/archiso/airootfs/usr/local/bin/installer.sh b/archiso/airootfs/usr/local/bin/installer.sh index d56ebc9..268ca82 100644 --- a/archiso/airootfs/usr/local/bin/installer.sh +++ b/archiso/airootfs/usr/local/bin/installer.sh @@ -376,6 +376,11 @@ grub-mkconfig -o /boot/grub/grub.cfg systemctl enable NetworkManager systemctl enable fstrim.timer +# Configure PAM for gnome-keyring auto-unlock on login +# This allows the keyring to be unlocked automatically with user password +echo "auth optional pam_gnome_keyring.so" >> /etc/pam.d/login +echo "session optional pam_gnome_keyring.so auto_start" >> /etc/pam.d/login + # Set root password (same as user for now, should be changed) echo "root:$USER_PASSWORD" | chpasswd diff --git a/archiso/target-packages.x86_64 b/archiso/target-packages.x86_64 index e2658b9..267245c 100644 --- a/archiso/target-packages.x86_64 +++ b/archiso/target-packages.x86_64 @@ -5,11 +5,15 @@ # Wayland/Hyprland hyprland xdg-desktop-portal-hyprland -polkit-kde-agent +polkit-gnome qt5-wayland qt6-wayland glfw +# Authentication/Keyring +gnome-keyring +libsecret + # Desktop components waybar rofi diff --git a/dot_config/hypr/hyprland.conf b/dot_config/hypr/hyprland.conf index 4bedabd..986da52 100644 --- a/dot_config/hypr/hyprland.conf +++ b/dot_config/hypr/hyprland.conf @@ -8,7 +8,8 @@ monitor=,preferred,auto,1 exec-once = waybar exec-once = mako exec-once = swaybg -i ~/Pictures/wallpaper.jpg -m fill -exec-once = /usr/lib/polkit-kde-authentication-agent-1 +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec-once = gnome-keyring-daemon --start --components=secrets,pkcs11,ssh # Environment variables env = XCURSOR_SIZE,24 @@ -17,6 +18,7 @@ env = QT_QPA_PLATFORM,wayland env = GDK_BACKEND,wayland,x11 env = SDL_VIDEODRIVER,wayland env = CLUTTER_BACKEND,wayland +env = SSH_AUTH_SOCK,$XDG_RUNTIME_DIR/gcr/ssh # General settings general {