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..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 @@ -392,19 +397,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..267245c --- /dev/null +++ b/archiso/target-packages.x86_64 @@ -0,0 +1,74 @@ +# 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-gnome +qt5-wayland +qt6-wayland +glfw + +# Authentication/Keyring +gnome-keyring +libsecret + +# 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" 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 {