Created
January 6, 2026 13:35
-
-
Save ExilProductions/d25a66031a3a4a8fc91b74dabfdd0f15 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| clear | |
| echo "======================================" | |
| echo " Arch Linux + Hyprland Guided Installer" | |
| echo "======================================" | |
| sleep 2 | |
| # Root check | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "Run as root." | |
| exit 1 | |
| fi | |
| # Keyboard | |
| loadkeys us | |
| # Time | |
| timedatectl set-ntp true | |
| # Disk selection | |
| lsblk | |
| read -rp "Enter target disk (e.g. /dev/sda or /dev/nvme0n1): " DISK | |
| echo "THIS WILL ERASE ALL DATA ON $DISK" | |
| read -rp "Type YES to continue: " CONFIRM | |
| [[ "$CONFIRM" != "YES" ]] && exit 1 | |
| # Partition | |
| parted "$DISK" --script mklabel gpt | |
| parted "$DISK" --script mkpart EFI fat32 1MiB 512MiB | |
| parted "$DISK" --script set 1 esp on | |
| parted "$DISK" --script mkpart ROOT ext4 512MiB 100% | |
| EFI="${DISK}1" | |
| ROOT="${DISK}2" | |
| # Format | |
| mkfs.fat -F32 "$EFI" | |
| mkfs.ext4 -F "$ROOT" | |
| # Mount | |
| mount "$ROOT" /mnt | |
| mkdir -p /mnt/boot | |
| mount "$EFI" /mnt/boot | |
| # Base install | |
| pacstrap /mnt \ | |
| base \ | |
| linux \ | |
| linux-firmware \ | |
| base-devel \ | |
| networkmanager \ | |
| sudo \ | |
| vim \ | |
| git | |
| genfstab -U /mnt >> /mnt/etc/fstab | |
| # Chroot | |
| arch-chroot /mnt /bin/bash <<'EOF' | |
| set -e | |
| # Timezone | |
| ln -sf /usr/share/zoneinfo/UTC /etc/localtime | |
| hwclock --systohc | |
| # Locale | |
| sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen | |
| locale-gen | |
| echo "LANG=en_US.UTF-8" > /etc/locale.conf | |
| # Hostname | |
| read -rp "Hostname: " HOST | |
| echo "$HOST" > /etc/hostname | |
| cat <<HOSTS > /etc/hosts | |
| 127.0.0.1 localhost | |
| ::1 localhost | |
| 127.0.1.1 $HOST.localdomain $HOST | |
| HOSTS | |
| # Root password | |
| echo "Set root password" | |
| passwd | |
| # User | |
| read -rp "Username: " USERNAME | |
| useradd -m -G wheel $USERNAME | |
| passwd $USERNAME | |
| echo "%wheel ALL=(ALL) ALL" > /etc/sudoers.d/wheel | |
| # Network | |
| systemctl enable NetworkManager | |
| # Bootloader | |
| pacman -S --noconfirm grub efibootmgr | |
| grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH | |
| grub-mkconfig -o /boot/grub/grub.cfg | |
| # ========================= | |
| # HYPRLAND INSTALL SECTION | |
| # ========================= | |
| pacman -S --noconfirm \ | |
| hyprland \ | |
| xdg-desktop-portal-hyprland \ | |
| wayland \ | |
| wayland-protocols \ | |
| wlroots \ | |
| pipewire \ | |
| pipewire-audio \ | |
| pipewire-pulse \ | |
| wireplumber \ | |
| kitty \ | |
| firefox \ | |
| polkit \ | |
| grim \ | |
| slurp \ | |
| wl-clipboard \ | |
| mako \ | |
| thunar \ | |
| sddm | |
| # Enable services | |
| systemctl enable sddm | |
| systemctl enable pipewire pipewire-pulse | |
| # Polkit | |
| pacman -S --noconfirm polkit-gnome | |
| # Hyprland config | |
| mkdir -p /home/$USERNAME/.config/hypr | |
| cat <<HYPR > /home/$USERNAME/.config/hypr/hyprland.conf | |
| monitor=,preferred,auto,1 | |
| exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP | |
| exec-once = waybar & | |
| exec-once = mako & | |
| input { | |
| kb_layout = us | |
| } | |
| bind = SUPER, RETURN, exec, kitty | |
| bind = SUPER, Q, killactive | |
| bind = SUPER, M, exit | |
| bind = SUPER, E, exec, thunar | |
| HYPR | |
| chown -R $USERNAME:$USERNAME /home/$USERNAME/.config | |
| # Wayland SDDM | |
| mkdir -p /etc/sddm.conf.d | |
| cat <<SDDM > /etc/sddm.conf.d/wayland.conf | |
| [General] | |
| DisplayServer=wayland | |
| SDDM | |
| EOF | |
| # Finish | |
| umount -R /mnt | |
| echo "======================================" | |
| echo " Installation complete. Rebooting..." | |
| echo "======================================" | |
| reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment