├── img └── mockup.png ├── bin └── rate_mirrors ├── run.sh ├── LICENSE ├── README.md ├── config └── pacman.conf ├── installer.sh └── postinstall.sh /img/mockup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayasdev/simplyarch/HEAD/img/mockup.png -------------------------------------------------------------------------------- /bin/rate_mirrors: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayasdev/simplyarch/HEAD/bin/rate_mirrors -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is used to bootstrap SimplyArch Installer 4 | # Copyright (C) The SimplyArch Authors 5 | 6 | # Released under the MIT license 7 | 8 | # Usage: 9 | # curl -L is.gd/simplyarch > run ; sh run 10 | 11 | # See our stats at: https://is.gd/stats.php?url=simplyarch 12 | 13 | clear 14 | echo "SimplyArch Installer will start in a few seconds..." 15 | echo 16 | pacman -Sy glibc --noconfirm 17 | pacman -S git --noconfirm 18 | git clone https://github.com/geminis3/simplyarch 19 | cd simplyarch || exit 20 | chmod +x installer.sh 21 | ./installer.sh 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 The SimplyArch Authors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
7 | ⚡ Faster, better ⚡ 8 |
9 | 10 | 11 | ## Disclaimer ⚠ 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. 14 | 15 | ## Pre-requisites 🔎 16 | 17 | - A working internet connection. 18 | - A previously partitioned disk (you can use `cfdisk`, `fdisk`, `parted` or the tool of your preference). 19 | 20 | Tip 💡: See reference partition layouts for UEFI and BIOS at the [Arch Linux Wiki](https://wiki.archlinux.org/title/Partitioning#Example_layouts). 21 | 22 | ## How to use it? 🚀 23 | 24 | From a booted [Arch Linux ISO](https://archlinux.org/download) just type: 25 | 26 | curl -L is.gd/simplyarch > run; sh run 27 | 28 | ## Main features ✨ 29 | 30 | ### Minimal base OS 31 | 32 | Only the packages you need to start your Arch Linux journey, nothing you don't! 33 | 34 | ### Filesystems supported 35 | 36 | - EXT4 37 | - BTRFS (special thanks to [@lenuswalker](https://github.com/lenuswalker)) 38 | - NEW! XFS (with big timestamps) 39 | 40 | ### Kernel selector 41 | 42 | Choose between the officially supported Arch Linux kernel flavors: 43 | 44 | - linux 45 | - linux-lts 46 | - linux-zen 47 | - linux-hardened 48 | 49 | Learn more at the [Arch Linux Wiki](https://wiki.archlinux.org/title/kernel#Officially_supported_kernels). 50 | 51 | ### Blazing fast installation 52 | 53 | - Powered by the superb [rate-mirrors](https://github.com/westandskif/rate-mirrors) tool and Pacman 6.0 multithreaded downloads. 54 | - Updated mirrors on installed system for a more pleasing experience. 55 | 56 | ### Install the AUR helper of your preference 57 | 58 | Choose between [Yay](https://github.com/Jguer/yay), [Paru](https://github.com/Morganamilo/paru) or none. 59 | 60 | ### More secure 61 | 62 | Automatic CPU microcode installation to protect you against hardware flaws. 63 | 64 | ## Completely optional postinstall wizard ⚙ 📦 🖥️ 65 | 66 | A plain TTY is not enough for you?, we got you covered! 67 | 68 | ### Desktop environment installer 69 | 70 | Choose the one you like the most without fearing for bloated installations, we try to keep them simple. 71 | 72 | - GNOME 73 | - KDE Plasma 74 | - Xfce 75 | - MATE 76 | - LXQt 77 | - LXDE 78 | - Cinnamon 79 | - Cutefish 80 | 81 | ### Automatic VM guest additions installer 82 | 83 | Installing Arch Linux inside a VM?, don't worry we can install them for KVM, VirtualBox and VMWare. 84 | 85 | ### Smart driver installer 86 | 87 | Have an Nvidia GPU? Nvidia GPU on laptop? Broadcom WiFi? Intel or AMD GPU and needing VAAPI for hardware acceleration?, our driver installer will take care of those. 88 | 89 | ### App installer 90 | 91 | Choose among 24 browsers, productivity software, system utilities and more. 92 | 93 | ## I want to help SimplyArch development 🙋♀️🙋♂️ 94 | 95 | Feel free to open an Issue or Pull Request and I'll be happy to receive any feedback or code improvement. 96 | -------------------------------------------------------------------------------- /config/pacman.conf: -------------------------------------------------------------------------------- 1 | # 2 | # /etc/pacman.conf 3 | # 4 | # See the pacman.conf(5) manpage for option and repository directives 5 | 6 | # 7 | # GENERAL OPTIONS 8 | # 9 | [options] 10 | # The following paths are commented out with their default values listed. 11 | # If you wish to use different paths, uncomment and update the paths. 12 | #RootDir = / 13 | #DBPath = /var/lib/pacman/ 14 | #CacheDir = /var/cache/pacman/pkg/ 15 | #LogFile = /var/log/pacman.log 16 | #GPGDir = /etc/pacman.d/gnupg/ 17 | #HookDir = /etc/pacman.d/hooks/ 18 | HoldPkg = pacman glibc 19 | #XferCommand = /usr/bin/curl -L -C - -f -o %o %u 20 | #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u 21 | #CleanMethod = KeepInstalled 22 | Architecture = auto 23 | 24 | # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup 25 | #IgnorePkg = 26 | #IgnoreGroup = 27 | 28 | #NoUpgrade = 29 | #NoExtract = 30 | 31 | # Misc options 32 | #UseSyslog 33 | Color 34 | ILoveCandy 35 | #NoProgressBar 36 | CheckSpace 37 | #VerbosePkgLists 38 | ParallelDownloads = 10 39 | 40 | # By default, pacman accepts packages signed by keys that its local keyring 41 | # trusts (see pacman-key and its man page), as well as unsigned packages. 42 | SigLevel = Required DatabaseOptional 43 | LocalFileSigLevel = Optional 44 | #RemoteFileSigLevel = Required 45 | 46 | # NOTE: You must run `pacman-key --init` before first using pacman; the local 47 | # keyring can then be populated with the keys of all official Arch Linux 48 | # packagers with `pacman-key --populate archlinux`. 49 | 50 | # 51 | # REPOSITORIES 52 | # - can be defined here or included from another file 53 | # - pacman will search repositories in the order defined here 54 | # - local/custom mirrors can be added here or in separate files 55 | # - repositories listed first will take precedence when packages 56 | # have identical names, regardless of version number 57 | # - URLs will have $repo replaced by the name of the current repo 58 | # - URLs will have $arch replaced by the name of the architecture 59 | # 60 | # Repository entries are of the format: 61 | # [repo-name] 62 | # Server = ServerName 63 | # Include = IncludePath 64 | # 65 | # The header [repo-name] is crucial - it must be present and 66 | # uncommented to enable the repo. 67 | # 68 | 69 | # The testing repositories are disabled by default. To enable, uncomment the 70 | # repo name header and Include lines. You can add preferred servers immediately 71 | # after the header, and they will be used before the default mirrors. 72 | 73 | #[testing] 74 | #Include = /etc/pacman.d/mirrorlist 75 | 76 | [core] 77 | Include = /etc/pacman.d/mirrorlist 78 | 79 | [extra] 80 | Include = /etc/pacman.d/mirrorlist 81 | 82 | #[community-testing] 83 | #Include = /etc/pacman.d/mirrorlist 84 | 85 | [community] 86 | Include = /etc/pacman.d/mirrorlist 87 | 88 | # If you want to run 32 bit applications on your x86_64 system, 89 | # enable the multilib repositories as required here. 90 | 91 | #[multilib-testing] 92 | #Include = /etc/pacman.d/mirrorlist 93 | 94 | [multilib] 95 | Include = /etc/pacman.d/mirrorlist 96 | 97 | # An example of a custom package repository. See the pacman manpage for 98 | # tips on creating your own repositories. 99 | #[custom] 100 | #SigLevel = Optional TrustAll 101 | #Server = file:///home/custompkgs 102 | -------------------------------------------------------------------------------- /installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is the core script used by SimplyArch Installer 4 | # Copyright (C) The SimplyArch Authors 5 | 6 | # Released under the MIT license 7 | 8 | # Function declaration begins 9 | 10 | # Message displayed to user at start 11 | greeting(){ 12 | echo 13 | echo "Welcome to SimplyArch Installer v2" 14 | echo "Copyright (C) The SimplyArch Authors" 15 | echo 16 | echo "DISCLAIMER: THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED" 17 | echo 18 | echo "WARNING: MAKE SURE TO TYPE CORRECTLY BECAUSE THE SCRIPT WON'T PERFORM INPUT VALIDATIONS" 19 | echo 20 | echo "We'll guide you through the Arch Linux installation process" 21 | echo 22 | } 23 | 24 | # Gather data about the user's computer 25 | analyze_host(){ 26 | echo 27 | echo "System Analysis:" 28 | echo 29 | # Check BIOS type 30 | if [[ -d /sys/firmware/efi ]] 31 | then 32 | bios_type="uefi" 33 | echo "Detected UEFI" 34 | else 35 | bios_type="bios" 36 | echo "Detected BIOS" 37 | fi 38 | # Check CPU vendor 39 | if [ -n "$(lscpu | grep GenuineIntel)" ] 40 | then 41 | cpu_vendor="intel" 42 | echo "Detected Intel CPU" 43 | elif [ -n "$(lscpu | grep AuthenticAMD)" ] 44 | then 45 | cpu_vendor="amd" 46 | echo "Detected AMD CPU" 47 | fi 48 | sleep 3 49 | } 50 | 51 | # Language & Keyboard setup 52 | locales(){ 53 | echo 54 | echo "1. Language & Keyboard Setup" 55 | echo 56 | echo "HINT: write en_US for English US (don't add .UTF-8)" 57 | echo 58 | read -p "> System Language: " language 59 | # If no input from user then default to en_US 60 | if [[ -z "$language" ]] 61 | then 62 | language="en_US" 63 | fi 64 | echo 65 | echo "EXAMPLES: us United States | us-acentos US Intl | latam Latin American Spanish | es Spanish" 66 | echo 67 | read -p "> Keyboard Distribution: " keyboard 68 | # If no input from user then default to us keyboard 69 | if [[ -z "$keyboard" ]] 70 | then 71 | keyboard="us" 72 | fi 73 | # Load selected keyboard distribution 74 | loadkeys "$keyboard" 75 | } 76 | 77 | # Account setup 78 | user_accounts(){ 79 | echo 80 | echo "2. User Accounts" 81 | echo 82 | read -p "> Choose a hostname for this computer: " hostname 83 | # If no input from user then default to archlinux 84 | if [[ -z "$hostname" ]] 85 | then 86 | hostname="archlinux" 87 | fi 88 | echo 89 | echo "Administrator User" 90 | echo "User: root" 91 | read -sp "> Password: " root_password 92 | echo 93 | read -sp "> Re-type password: " root_password2 94 | echo 95 | while [[ "$root_password" != "$root_password2" ]] 96 | do 97 | echo 98 | echo "Passwords don't match. Try again" 99 | echo 100 | read -sp "> Password: " root_password 101 | echo 102 | read -sp "> Re-type password: " root_password2 103 | echo 104 | done 105 | echo 106 | echo "Standard User" 107 | read -p "> User: " user 108 | export user 109 | read -sp "> Password: " user_password 110 | echo 111 | read -sp "> Re-type password: " user_password2 112 | echo 113 | while [[ "$user_password" != "$user_password2" ]] 114 | do 115 | echo 116 | echo "Passwords don't match. Try again" 117 | echo 118 | read -sp "> Password: " user_password 119 | echo 120 | read -sp "> Re-type password: " user_password2 121 | echo 122 | done 123 | } 124 | 125 | # Disk setup 126 | disks(){ 127 | echo 128 | echo "3. Disks Setup" 129 | echo 130 | echo "Make sure to have your disk previously partitioned, if you are unsure re-run this script when done" 131 | echo 132 | echo "HINT: you can use cfdisk, fdisk, parted or the tool of your preference" 133 | echo "For reference partition layouts check out the Arch Wiki entry at https://bit.ly/3m4I33p" 134 | echo 135 | echo "Your current partition table:" 136 | echo 137 | lsblk 138 | echo 139 | read -p "> Do you want to continue? (Y/N): " prompt 140 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 141 | then 142 | # Filesystem 143 | clear 144 | echo 145 | echo "3. Disks Setup" 146 | while ! [[ "$filesystem" =~ ^(1|2|3)$ ]] 147 | do 148 | echo 149 | echo "Choose a filesystem for your root partition:" 150 | echo 151 | echo "1. EXT4 (the standard choice for most users)" 152 | echo "2. BTRFS (a modern copy on write (CoW) filesystem)" 153 | echo "3. XFS (a high-performance journaling file system)" 154 | echo 155 | read -p "> Filesystem (1-3): " filesystem 156 | done 157 | # Root partition 158 | clear 159 | echo 160 | echo "3. Disks Setup" 161 | echo 162 | echo "Your current partition table:" 163 | echo 164 | lsblk 165 | echo 166 | echo "Write the name of the partition e.g: /dev/sdaX /dev/nvme0n1pX" 167 | read -p "> Root partition: " root_partition 168 | case "$filesystem" in 169 | 1) 170 | mkfs.ext4 "$root_partition" 171 | mount "$root_partition" /mnt 172 | ;; 173 | 2) 174 | mkfs.btrfs -f -L "Arch Linux" "$root_partition" 175 | mount "$root_partition" /mnt 176 | btrfs su cr /mnt/@ 177 | btrfs su cr /mnt/@home 178 | umount "$root_partition" 179 | mount -o noatime,commit=120,compress=zstd,space_cache,subvol=@ "$root_partition" /mnt 180 | mkdir /mnt/home 181 | mount -o noatime,commit=120,compress=zstd,space_cache,subvol=@home "$root_partition" /mnt/home 182 | ;; 183 | 3) 184 | mkfs.xfs -f -m bigtime=1 -L "Arch Linux" "$root_partition" 185 | mount "$root_partition" /mnt 186 | ;; 187 | esac 188 | # EFI only needed for UEFI 189 | if [[ "$bios_type" == "uefi" ]] 190 | then 191 | clear 192 | echo 193 | echo "3. Disks Setup" 194 | echo 195 | echo "Your current partition table:" 196 | echo 197 | lsblk 198 | echo 199 | echo "Write the name of the partition e.g: /dev/sdaX /dev/nvme0n1pX" 200 | read -p "> EFI partition: " efi_partition 201 | echo 202 | echo "HINT: If you're dualbooting another OS type N otherwise Y" 203 | read -p "> Do you want to format this EFI partition as FAT32? (Y/N): " format_efi 204 | if [[ "$format_efi" == "y" || "$format_efi" == "Y" || "$format_efi" == "yes" || "$format_efi" == "Yes" ]] 205 | then 206 | mkfs.fat -F32 "$efi_partition" 207 | fi 208 | mkdir -p /mnt/boot/efi 209 | mount "$efi_partition" /mnt/boot/efi 210 | fi 211 | # Swap 212 | clear 213 | echo "3. Disks Setup" 214 | echo 215 | echo "Your current partition table:" 216 | echo 217 | lsblk 218 | echo 219 | echo "HINT: If you don't want to use a Swap partition type N below" 220 | echo 221 | echo "Write the name of the partition e.g: /dev/sdaX /dev/nvme0n1pX" 222 | read -p "> Swap partition: " swap 223 | if [[ "$swap" == "n" || "$swap" == "N" || "$swap" == "no" || "$swap" == "No" ]] 224 | then 225 | echo 226 | echo "Swap partition not selected" 227 | sleep 1 228 | else 229 | mkswap "$swap" 230 | swapon "$swap" 231 | fi 232 | else 233 | echo 234 | echo "Installer aborted..." 235 | exit 236 | fi 237 | } 238 | 239 | # Allow user to select the kernel of their choice 240 | kernel_selector(){ 241 | while ! [[ "$kernel_flavor" =~ ^(1|2|3|4)$ ]] 242 | do 243 | echo 244 | echo "4. Kernel Selector" 245 | echo 246 | echo "Choose a kernel for your system:" 247 | echo 248 | echo "1. linux (the preferred choice for most users)" 249 | echo "2. linux-lts (a long-term supported kernel)" 250 | echo "3. linux-zen (a performance focused kernel)" 251 | echo "4. linux-hardened (a security focused kernel)" 252 | echo 253 | read -p "> Kernel flavor (1-4): " kernel_flavor 254 | done 255 | case "$kernel_flavor" in 256 | 1) 257 | kernel_flavor="linux" 258 | ;; 259 | 2) 260 | kernel_flavor="linux-lts" 261 | ;; 262 | 3) 263 | kernel_flavor="linux-zen" 264 | ;; 265 | 4) 266 | kernel_flavor="linux-hardened" 267 | ;; 268 | esac 269 | } 270 | 271 | # Update mirrors, accepted values: before, after 272 | mirror_updater(){ 273 | case $1 in 274 | "before" ) 275 | echo 276 | echo "Updating mirrors for faster install, please wait..." 277 | echo 278 | sudo -u nobody ./bin/rate_mirrors arch | tee /etc/pacman.d/mirrorlist 279 | ;; 280 | "after" ) 281 | echo 282 | echo "Updating mirrors for installed system, please wait..." 283 | echo 284 | sudo -u nobody ./bin/rate_mirrors arch | tee /mnt/etc/pacman.d/mirrorlist 285 | ;; 286 | esac 287 | } 288 | 289 | # Performs the actual system install 290 | arch_installer(){ 291 | # Install the base packages 292 | case "$bios_type" in 293 | "bios" ) 294 | pacstrap /mnt base base-devel "$kernel_flavor" "$kernel_flavor"-headers linux-firmware grub os-prober sudo bash-completion networkmanager nano xdg-user-dirs ntfs-3g 295 | ;; 296 | "uefi" ) 297 | pacstrap /mnt base base-devel "$kernel_flavor" "$kernel_flavor"-headers linux-firmware grub efibootmgr os-prober sudo bash-completion networkmanager nano xdg-user-dirs ntfs-3g 298 | ;; 299 | esac 300 | # Generate fstab with UUID 301 | genfstab -U /mnt >> /mnt/etc/fstab 302 | # Set language 303 | echo "$language.UTF-8 UTF-8" > /mnt/etc/locale.gen 304 | arch-chroot /mnt /bin/bash -c "locale-gen" 305 | echo "LANG=$language.UTF-8" > /mnt/etc/locale.conf 306 | # Set keyboard 307 | echo "KEYMAP=$keyboard" > /mnt/etc/vconsole.conf 308 | # Auto-detect timezone 309 | arch-chroot /mnt /bin/bash -c "ln -sf /usr/share/zoneinfo/$(curl https://ipapi.co/timezone) /etc/localtime" 310 | arch-chroot /mnt /bin/bash -c "hwclock --systohc" 311 | # Copy tweaked Pacman config 312 | cp ./config/pacman.conf /mnt/etc/pacman.conf 313 | # Set hostname 314 | echo "$hostname" > /mnt/etc/hostname 315 | echo "127.0.0.1 localhost" > /mnt/etc/hosts 316 | echo "::1 localhost" >> /mnt/etc/hosts 317 | echo "127.0.1.1 $hostname.localdomain $hostname" >> /mnt/etc/hosts 318 | # Update mirrors for installed system 319 | clear 320 | mirror_updater "after" 321 | # Install FS tools 322 | case "$filesystem" in 323 | 2) 324 | arch-chroot /mnt /bin/bash -c "pacman -Sy btrfs-progs --noconfirm --needed" 325 | ;; 326 | 3) 327 | arch-chroot /mnt /bin/bash -c "pacman -Sy xfsprogs xfsdump --noconfirm --needed" 328 | ;; 329 | esac 330 | # Install appropiate CPU microcode 331 | case "$cpu_vendor" in 332 | "intel" ) 333 | arch-chroot /mnt /bin/bash -c "pacman -Sy intel-ucode --noconfirm --needed" 334 | ;; 335 | "amd" ) 336 | arch-chroot /mnt /bin/bash -c "pacman -Sy amd-ucode --noconfirm --needed" 337 | ;; 338 | esac 339 | # Install bootloader 340 | case "$bios_type" in 341 | "bios" ) 342 | arch-chroot /mnt /bin/bash -c "grub-install --target=i386-pc ${root_partition::-1}" 343 | ;; 344 | "uefi" ) 345 | arch-chroot /mnt /bin/bash -c "grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Arch" 346 | ;; 347 | esac 348 | arch-chroot /mnt /bin/bash -c "grub-mkconfig -o /boot/grub/grub.cfg" 349 | # Enable Network Manager 350 | arch-chroot /mnt /bin/bash -c "systemctl enable NetworkManager.service" 351 | # Set root user password 352 | arch-chroot /mnt /bin/bash -c "(echo $root_password ; echo $root_password) | passwd root" 353 | # Setup user 354 | arch-chroot /mnt /bin/bash -c "useradd -m -G wheel $user" 355 | arch-chroot /mnt /bin/bash -c "(echo $user_password ; echo $user_password) | passwd $user" 356 | arch-chroot /mnt sed -i 's/# %wheel ALL=(ALL\(:ALL\)*) ALL/%wheel ALL=(ALL\1) ALL/' /etc/sudoers 357 | arch-chroot /mnt /bin/bash -c "xdg-user-dirs-update" 358 | # AUR installer 359 | clear 360 | aur_installer 361 | } 362 | 363 | # Install an AUR helper 364 | aur_installer(){ 365 | while ! [[ "$aur_helper" =~ ^(1|2|3)$ ]] 366 | do 367 | echo 368 | echo "5. AUR Installer" 369 | echo 370 | echo "Choose an AUR helper for your system:" 371 | echo 372 | echo "1. Yay" 373 | echo "2. Paru" 374 | echo "3. No AUR helper" 375 | echo 376 | read -p "> AUR helper (1-3): " aur_helper 377 | done 378 | case "$aur_helper" in 379 | 1) 380 | clear 381 | echo 382 | echo "5. AUR Installer" 383 | echo 384 | echo "Installing Yay..." 385 | echo 386 | arch-chroot /mnt /bin/bash -c "pacman -Sy git --noconfirm --needed" 387 | echo "cd && git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -si --noconfirm && cd && rm -rf yay-bin" | arch-chroot /mnt /bin/bash -c "su $user" 388 | ;; 389 | 2) 390 | clear 391 | echo 392 | echo "5. AUR Installer" 393 | echo 394 | echo "Installing Paru..." 395 | echo 396 | arch-chroot /mnt /bin/bash -c "pacman -Sy git --noconfirm --needed" 397 | echo "cd && git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -si --noconfirm && cd && rm -rf paru-bin" | arch-chroot /mnt /bin/bash -c "su $user" 398 | ;; 399 | esac 400 | } 401 | 402 | # Byeeeeee 403 | goodbye(){ 404 | echo 405 | echo "Thank you for using SimplyArch Installer!" 406 | echo 407 | echo "Installation finished successfully" 408 | echo 409 | read -p "> Would you like to reboot your computer? (Y/N): " prompt 410 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 411 | then 412 | echo 413 | echo "System will reboot in a moment..." 414 | sleep 3 415 | clear 416 | umount -a 417 | reboot 418 | else 419 | exit 420 | fi 421 | } 422 | 423 | # Function declaration ends 424 | 425 | # Main execution 426 | 427 | clear 428 | # Welcome 429 | greeting 430 | read -p "> Do you want to continue? (Y/N): " prompt 431 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 432 | then 433 | # Preparation 434 | clear 435 | analyze_host 436 | # Locale setup 437 | clear 438 | locales 439 | # User setup 440 | clear 441 | user_accounts 442 | # Disk setup 443 | clear 444 | disks 445 | # Kernel selector 446 | clear 447 | kernel_selector 448 | # Update mirrors before install 449 | clear 450 | mirror_updater "before" 451 | # Perform install 452 | clear 453 | arch_installer 454 | # Call postinstall 455 | clear 456 | chmod +x ./postinstall.sh 457 | ./postinstall.sh 458 | clear 459 | # End 460 | goodbye 461 | else 462 | echo 463 | echo "Installer aborted..." 464 | exit 465 | fi 466 | -------------------------------------------------------------------------------- /postinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is an optional post-installation script for SimplyArch Installer 4 | # Copyright (C) The SimplyArch Authors 5 | 6 | # Released under the MIT license 7 | 8 | # WARNING: 9 | # Designed to work inside archiso environment 10 | # The user variable is inherited from the parent script, however feel free to modify if run independently 11 | #user="your_username" 12 | 13 | # Function declaration begins 14 | 15 | # Message displayed to user at start 16 | greeting(){ 17 | echo 18 | echo "Welcome to the SimplyArch Post-Installation Wizard" 19 | echo "Copyright (C) The SimplyArch Authors" 20 | echo 21 | echo "DISCLAIMER: THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED" 22 | echo 23 | echo "WARNING: MAKE SURE TO TYPE CORRECTLY BECAUSE THE SCRIPT WON'T PERFORM INPUT VALIDATIONS" 24 | echo 25 | echo "We'll help you get your Arch Linux installation ready to rock!" 26 | echo 27 | } 28 | 29 | # Gather data about the user's hardware and current OS environment 30 | analyze_system(){ 31 | echo 32 | echo "System Analysis:" 33 | echo 34 | # Detect Intel GPU 35 | if (lspci | grep VGA | grep "Intel" &>/dev/null) 36 | then 37 | intel_gpu="true" 38 | echo "Detected Intel GPU" 39 | fi 40 | # Detect AMD GPU 41 | if (lspci | grep VGA | grep "ATI\|AMD/ATI" &> /dev/null) 42 | then 43 | amd_gpu="true" 44 | echo "Detected AMD GPU" 45 | fi 46 | # Detect Nvidia 47 | if [ -n "$(lspci | grep -i nvidia)" ] 48 | then 49 | nvidia_gpu="true" 50 | echo "Detected Nvidia GPU" 51 | fi 52 | # Detect Broadcom 53 | if (lspci | grep Network | grep Broadcom &> /dev/null) 54 | then 55 | broadcom_wifi="true" 56 | echo "Detected Broadcom WiFi card" 57 | fi 58 | # Detect VM 59 | vm=$(systemd-detect-virt) 60 | if [ "$vm" != "none" ] 61 | then 62 | echo "Running inside $vm" 63 | else 64 | echo "Running on a real machine" 65 | fi 66 | # Detect AUR helper 67 | if [ -n "$(arch-chroot /mnt /bin/bash -c "pacman -Qq | grep -i yay")" ] 68 | then 69 | aur_helper="yay" 70 | elif [ -n "$(arch-chroot /mnt /bin/bash -c "pacman -Qq | grep -i paru")" ] 71 | then 72 | aur_helper="paru" 73 | else 74 | echo 75 | echo "ERROR: This script cannot run without an AUR helper installed" 76 | goodbye 77 | fi 78 | sleep 3 79 | } 80 | 81 | # DE installer 82 | de_installer(){ 83 | while ! [[ "$desktop" =~ ^(1|2|3|4|5|6|7|8|9)$ ]] 84 | do 85 | echo 86 | echo "Desktop Environment Installer" 87 | echo 88 | echo "Please select one option:" 89 | echo 90 | echo "1. GNOME" 91 | echo "2. KDE Plasma" 92 | echo "3. Xfce" 93 | echo "4. MATE" 94 | echo "5. LXQt" 95 | echo "6. LXDE" 96 | echo "7. Cinnamon" 97 | echo "8. Cutefish" 98 | echo "9. Return to main menu" 99 | echo 100 | read -p "Desktop environment (1-9): " desktop 101 | done 102 | # Packages for each DE 103 | case $desktop in 104 | 1) 105 | de_pkgs="gnome-shell gdm gedit gnome-terminal gnome-control-center gnome-tweaks gnome-screenshot gnome-keyring file-roller nautilus nautilus-sendto sushi evince eog gnome-usage gnome-disk-utility adwaita-icon-theme xdg-desktop-portal gnome-tweaks chrome-gnome-shell power-profiles-daemon gnome-calculator seahorse xdg-user-dirs-gtk gvfs gvfs-mtp gvfs-afc gvfs-gphoto2 gvfs-nfs" 106 | ;; 107 | 2) 108 | de_pkgs="plasma-desktop sddm kinfocenter konsole dolphin kinit plasma-nm plasma-pa kscreen powerdevil sddm-kcm kdeconnect dbus-python kio-fuse audiocd-kio gwenview ark okular spectacle print-manager kate plasma-disks breeze-gtk kde-gtk-config xsettingsd" 109 | ;; 110 | 3) 111 | de_pkgs="xfce4 parole ristretto thunar-archive-plugin thunar-media-tags-plugin xfce4-battery-plugin xfce4-datetime-plugin xfce4-mount-plugin xfce4-netload-plugin xfce4-notifyd xfce4-pulseaudio-plugin xfce4-screensaver xfce4-screenshooter xfce4-taskmanager xfce4-wavelan-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin file-roller gvfs gvfs-mtp gvfs-afc gvfs-gphoto2 gvfs-nfs gvfs-smb network-manager-applet xed galculator lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings xdg-user-dirs-gtk" 112 | ;; 113 | 4) 114 | de_pkgs="mate mate-extra network-manager-applet xdg-user-dirs-gtk lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings gvfs gvfs-mtp gvfs-afc gvfs-gphoto2 gvfs-nfs gvfs-smb" 115 | ;; 116 | 5) 117 | de_pkgs="lxqt xdg-utils sddm libpulse libstatgrab libsysstat lm_sensors network-manager-applet breeze breeze-gtk featherpad pavucontrol-qt xscreensaver print-manager gvfs gvfs-mtp lxqt-archiver qt5-translations kio-fuse" 118 | ;; 119 | 6) 120 | de_pkgs="lxdm lxde leafpad galculator" 121 | ;; 122 | 7) 123 | de_pkgs="cinnamon cinnamon-translations gnome-terminal gnome-system-monitor gthumb x-apps file-roller lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings nemo-fileroller nemo-image-converter nemo-preview nemo-share gvfs gvfs-mtp gvfs-afc gvfs-gphoto2 gvfs-nfs gvfs-smb gnome-screenshot gnome-calculator xdg-user-dirs-gtk" 124 | ;; 125 | 8) 126 | de_pkgs="sddm cutefish" 127 | ;; 128 | 9) 129 | main_menu 130 | ;; 131 | esac 132 | # Install pkgs + xorg + pulseaudio 133 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -Sy xorg-server $de_pkgs pulseaudio pavucontrol ttf-dejavu --noconfirm --needed" 134 | # Enable display manager accordingly 135 | case $desktop in 136 | 1) 137 | arch-chroot /mnt /bin/bash -c "systemctl enable gdm.service" 138 | ;; 139 | 2) 140 | arch-chroot /mnt /bin/bash -c "systemctl enable sddm.service" 141 | ;; 142 | 3) 143 | arch-chroot /mnt /bin/bash -c "systemctl enable lightdm.service" 144 | ;; 145 | 4) 146 | arch-chroot /mnt /bin/bash -c "systemctl enable lightdm.service" 147 | ;; 148 | 5) 149 | arch-chroot /mnt /bin/bash -c "systemctl enable sddm.service" 150 | ;; 151 | 6) 152 | arch-chroot /mnt /bin/bash -c "systemctl enable lxdm.service" 153 | ;; 154 | 7) 155 | arch-chroot /mnt /bin/bash -c "systemctl enable lightdm.service" 156 | ;; 157 | 8) 158 | arch-chroot /mnt /bin/bash -c "systemctl enable sddm.service" 159 | ;; 160 | esac 161 | # Install VM drivers 162 | case "$vm" in 163 | "kvm" ) 164 | arch-chroot /mnt /bin/bash -c "pacman -Sy qemu-guest-agent spice-vdagent --noconfirm --needed" 165 | ;; 166 | "oracle" ) 167 | arch-chroot /mnt /bin/bash -c "pacman -Sy virtualbox-guest-utils xf86-video-vmware --noconfirm --needed" 168 | arch-chroot /mnt /bin/bash -c "systemctl enable vboxservice.service" 169 | ;; 170 | "vmware" ) 171 | arch-chroot /mnt /bin/bash -c "pacman -Sy open-vm-tools xf86-video-vmware xf86-input-vmmouse --noconfirm --needed" 172 | arch-chroot /mnt /bin/bash -c "systemctl enable vmtoolsd.service; systemctl enable vmware-vmblock-fuse.service" 173 | ;; 174 | esac 175 | driver_installer 176 | } 177 | 178 | # Smart driver installer 179 | driver_installer(){ 180 | # Nvidia 181 | if [ "$nvidia_gpu" == "true" ] 182 | then 183 | clear 184 | echo 185 | echo "Nvidia Driver Installer" 186 | echo 187 | echo "Detected Nvidia GPU" 188 | echo 189 | read -p "> Would you like to install the propietary Nvidia drivers? (Y/N): " prompt 190 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 191 | then 192 | arch-chroot /mnt /bin/bash -c "pacman -S nvidia-dkms nvidia-utils egl-wayland vdpauinfo --noconfirm --needed" 193 | # Optimus 194 | if [[ "$intel_gpu" == "true" || "$amd_gpu" == "true" ]] 195 | then 196 | clear 197 | echo 198 | echo "Dual-GPU system detected (Optimus Hybrid Graphics support)" 199 | echo 200 | echo "Optimus Manager is NOT recommended on Turing (RTX) or newer cards that implement native power management" 201 | echo "See Nvidia documentation at https://bit.ly/3F59nr2" 202 | echo 203 | read -p "> Would you like to install Optimus Manager? (Y/N): " prompt 204 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 205 | then 206 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S optimus-manager optimus-manager-qt --noconfirm --needed" 207 | fi 208 | fi 209 | fi 210 | fi 211 | # Broadcom 212 | if [ "$broadcom_wifi" == "true" ] 213 | then 214 | clear 215 | echo 216 | echo "Broadcom Driver Installer" 217 | echo 218 | echo "Detected Broadcom WiFi" 219 | echo 220 | read -p "> Would you like to install the propietary Broadcom drivers? (Y/N): " prompt 221 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 222 | then 223 | arch-chroot /mnt /bin/bash -c "pacman -S broadcom-wl-dkms --noconfirm --needed" 224 | fi 225 | fi 226 | # Intel 227 | if [ "$intel_gpu" == "true" ] 228 | then 229 | clear 230 | echo 231 | echo "Intel VAAPI Driver Installer" 232 | echo 233 | echo "Recommended for GPU accelerated video decode on supported applications" 234 | echo "For more information see the Arch Wiki entry at https://bit.ly/3zUBDsD" 235 | echo 236 | read -p "> Would you like to install Intel VAAPI drivers? (Y/N): " prompt 237 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 238 | then 239 | arch-chroot /mnt /bin/bash -c "pacman -S libva-intel-driver intel-media-driver libva-utils --noconfirm --needed" 240 | fi 241 | fi 242 | # AMD 243 | if [ "$amd_gpu" == "true" ] 244 | then 245 | clear 246 | echo 247 | echo "AMD VAAPI/VDPAU Driver Installer" 248 | echo 249 | echo "Recommended for GPU accelerated video decode on supported applications" 250 | echo "For more information see the Arch Wiki entry at https://bit.ly/3zUBDsD" 251 | echo 252 | read -p "> Would you like to install AMD VAAPI/VDPAU drivers? (Y/N): " prompt 253 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 254 | then 255 | arch-chroot /mnt /bin/bash -c "pacman -S libva-mesa-driver libva-utils mesa-vdpau vdpauinfo --noconfirm --needed" 256 | fi 257 | fi 258 | clear 259 | app_installer 260 | } 261 | 262 | # Install Software 263 | app_installer(){ 264 | while ! [[ "$app" =~ ^(25)$ ]] 265 | do 266 | clear 267 | echo 268 | echo "App Installer" 269 | echo 270 | echo "Available app categories:" 271 | echo 272 | echo ">>> Browsers" 273 | echo 274 | echo "1. Google Chrome" 275 | echo "2. Firefox" 276 | echo "3. Opera" 277 | echo "4. Brave" 278 | echo "5. Chromium" 279 | echo 280 | echo ">>> Work & Communication" 281 | echo 282 | echo "6. LibreOffice Fresh" 283 | echo "7. WPS Office" 284 | echo "8. OnlyOffice" 285 | echo "9. Zoom" 286 | echo "10. Microsoft Teams" 287 | echo "11. Slack" 288 | echo "12. Telegram Desktop" 289 | echo 290 | echo ">>> Multimedia" 291 | echo 292 | echo "13. VLC" 293 | echo "14. MPV" 294 | echo 295 | echo ">>> System Utilities & Software Management" 296 | echo 297 | echo "15. GParted" 298 | echo "16. Timeshift Backup" 299 | echo "17. Flatpak" 300 | echo "18. Snap" 301 | echo "19. Pamac (Manjaro App Store includes Flatpak and Snap)" 302 | echo 303 | echo ">>> Text Editors" 304 | echo 305 | echo "20. Visual Studio Code" 306 | echo "21. Vim" 307 | echo "22. Neovim" 308 | echo "23. GNU Emacs" 309 | echo "24. Atom" 310 | echo 311 | echo "25. Return to main menu" 312 | echo 313 | read -p "App (1-25): " app 314 | case $app in 315 | 1) 316 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S google-chrome --noconfirm --needed" 317 | ;; 318 | 2) 319 | arch-chroot /mnt /bin/bash -c "pacman -S firefox --noconfirm --needed" 320 | ;; 321 | 3) 322 | arch-chroot /mnt /bin/bash -c "pacman -S opera opera-ffmpeg-codecs --noconfirm --needed" 323 | ;; 324 | 4) 325 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S brave-bin --noconfirm --needed" 326 | ;; 327 | 5) 328 | arch-chroot /mnt /bin/bash -c "pacman -S chromium --noconfirm --needed" 329 | ;; 330 | 6) 331 | arch-chroot /mnt /bin/bash -c "pacman -S libreoffice-fresh --noconfirm --needed" 332 | ;; 333 | 7) 334 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S wps-office --noconfirm --needed" 335 | ;; 336 | 8) 337 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S onlyoffice-bin --noconfirm --needed" 338 | ;; 339 | 9) 340 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S zoom --noconfirm --needed" 341 | ;; 342 | 10) 343 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S teams--noconfirm --needed" 344 | ;; 345 | 11) 346 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S slack-desktop --noconfirm --needed" 347 | ;; 348 | 12) 349 | arch-chroot /mnt /bin/bash -c "pacman -S telegram-desktop --noconfirm --needed" 350 | ;; 351 | 13) 352 | arch-chroot /mnt /bin/bash -c "pacman -S vlc --noconfirm --needed" 353 | ;; 354 | 14) 355 | arch-chroot /mnt /bin/bash -c "pacman -S mpv --noconfirm --needed" 356 | ;; 357 | 15) 358 | arch-chroot /mnt /bin/bash -c "pacman -S gparted --noconfirm --needed" 359 | ;; 360 | 16) 361 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S timeshift --noconfirm --needed" 362 | ;; 363 | 17) 364 | arch-chroot /mnt /bin/bash -c "pacman -S flatpak --noconfirm --needed" 365 | ;; 366 | 18) 367 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S snapd --noconfirm --needed" 368 | ;; 369 | 19) 370 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S pamac-all --noconfirm --needed" 371 | ;; 372 | 20) 373 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S visual-studio-code-bin --noconfirm --needed" 374 | ;; 375 | 21) 376 | arch-chroot /mnt /bin/bash -c "pacman -S vim --noconfirm --needed" 377 | ;; 378 | 22) 379 | arch-chroot /mnt /bin/bash -c "pacman -S neovim --noconfirm --needed" 380 | ;; 381 | 23) 382 | arch-chroot /mnt /bin/bash -c "pacman -S emacs --noconfirm --needed" 383 | ;; 384 | 24) 385 | arch-chroot /mnt /bin/bash -c "pacman -S atom --noconfirm --needed" 386 | ;; 387 | esac 388 | done 389 | main_menu 390 | } 391 | 392 | # Byeeeeee 393 | goodbye(){ 394 | echo 395 | echo "Thank you for using SimplyArch Post-Installation Wizard!" 396 | sleep 3 397 | exit 398 | } 399 | 400 | # Main menu 401 | main_menu(){ 402 | clear 403 | # Reset menu flag 404 | option=0 405 | while ! [[ "$option" =~ ^(1|2|3|4)$ ]] 406 | do 407 | echo 408 | echo "SimplyArch Post-Installation Wizard" 409 | echo 410 | echo "1. Install a Desktop Environment" 411 | echo "2. Smart Driver Installer" 412 | echo "3. Install additional software" 413 | echo "4. Exit" 414 | echo 415 | read -p "> Choose an option (1-4): " option 416 | case "$option" in 417 | 1) 418 | clear 419 | de_installer 420 | ;; 421 | 2) 422 | clear 423 | driver_installer 424 | ;; 425 | 3) 426 | clear 427 | app_installer 428 | ;; 429 | 4) 430 | clear 431 | goodbye 432 | ;; 433 | esac 434 | done 435 | } 436 | 437 | # Function declaration ends 438 | 439 | # Main execution 440 | 441 | clear 442 | greeting 443 | read -p "> Do you want to continue? (Y/N): " prompt 444 | if [[ "$prompt" == "y" || "$prompt" == "Y" || "$prompt" == "yes" || "$prompt" == "Yes" ]] 445 | then 446 | clear 447 | analyze_system 448 | # Install rate-mirrors on user's system 449 | clear 450 | echo 451 | echo "Installing rate-mirrors for convenient mirror updates...." 452 | echo 453 | echo "Usage:" 454 | echo "rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist" 455 | echo 456 | sleep 5 457 | arch-chroot /mnt /bin/bash -c "sudo -u $user $aur_helper -S rate-mirrors-bin --noconfirm --needed" 458 | clear 459 | main_menu 460 | else 461 | echo 462 | echo "Installer aborted..." 463 | exit 464 | fi 465 | --------------------------------------------------------------------------------