commit e980382baebb909f374f266fc6f3c8f4b98080ac Author: Luca Date: Sat May 7 13:27:51 2022 +0100 easy install diff --git a/artix-install b/artix-install new file mode 100755 index 0000000..5b5a779 --- /dev/null +++ b/artix-install @@ -0,0 +1,167 @@ +#!/bin/sh + +# Colors : +Green='\033[0;32m' # Green +Cyan='\033[1;36m' # Cyan +No='\e[0m' + + +echo -e "${Cyan}░█████╗░██████╗░████████╗██╗██╗░░██╗" +echo -e "${Cyan}██╔══██╗██╔══██╗╚══██╔══╝██║╚██╗██╔╝" +echo -e "${Cyan}███████║██████╔╝░░░██║░░░██║░╚███╔╝░" +echo -e "${Cyan}██╔══██║██╔══██╗░░░██║░░░██║░██╔██╗░" +echo -e "${Cyan}██║░░██║██║░░██║░░░██║░░░██║██╔╝╚██╗" +echo -e "${Cyan}╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚═╝╚═╝░░╚═╝" +echo -e "${Cyan}██╗███╗░░██╗░██████╗████████╗░█████╗░██╗░░░░░██╗░░░░░███████╗██████╗░" +echo -e "${Cyan}██║████╗░██║██╔════╝╚══██╔══╝██╔══██╗██║░░░░░██║░░░░░██╔════╝██╔══██╗" +echo -e "${Cyan}██║██╔██╗██║╚█████╗░░░░██║░░░███████║██║░░░░░██║░░░░░█████╗░░██████╔╝" +echo -e "${Cyan}██║██║╚████║░╚═══██╗░░░██║░░░██╔══██║██║░░░░░██║░░░░░██╔══╝░░██╔══██╗" +echo -e "${Cyan}██║██║░╚███║██████╔╝░░░██║░░░██║░░██║███████╗███████╗███████╗██║░░██║" +echo -e "${Cyan}╚═╝╚═╝░░╚══╝╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚══════╝╚══════╝╚══════╝╚═╝░░╚═╝" + +#part1 +# Seting system : +echo -e "${Cyan}Macking the system ready for installation${No}" +pacman --noconfirm -Sy artix-keyring +loadkeys fr +timedatectl set-ntp true +clear + +# Partiton : +echo -e "${Cyan}Partitioning The Drive${No}" +lsblk +printf "${Cyan}Enter The Drive : ${No}" +read drive +cfdisk $drive +clear +echo -e "${Cyan}Formating Partitions${No}" +lsblk +printf "${Cyan}Enter The EFI Partition : ${No}" +read efipart +mkfs.fat -F32 $efipart +read -p "Did you also create Swap partition? [y/n] : " answer +if [[ $answer = y ]] ; then + printf "${Cyan}Enter The Swap Partition : ${No}" + read swappart + mkswap $swappart +fi +printf "${Cyan}Enter The Linux Partition : ${No}" +read linuxpart +mkfs.ext4 $linuxpart + +# Monting : +mount $linuxpart /mnt +mkdir -p /mnt/boot/efi +mount $efipart /mnt/boot/efi +swapon $swappart +clear +lsblk +echo -e "${Cyan}Installing Base Packages${No}" +basestrap /mnt base base-devel runit elogind-runit linux linux-headers linux-firmware broadcom-wl bluez bluez-runit bluez-utils vim nano xf86-video-intel intel-ucode +echo -e "${Green}Installation Done${No}" +fstabgen -U /mnt >> /mnt/etc/fstab + +# Setting Part2 : +sed '1,/^#part2$/d' `basename $0` > /mnt/artix_install2.sh +chmod +x /mnt/artix_install2.sh +artix-chroot /mnt ./artix_install2.sh +exit + +#part2 +# Colors : +Green='\033[0;32m' # Green +Cyan='\033[1;36m' # Cyan +No='\e[0m' + +# Installing System Packages : +echo -e "${Cyan}Installing System Packages${No}" +pacman --noconfirm --needed -S artix-keyring artix-archlinux-support +# pacman.conf Edit : +sed -i "s/#Color/Color/" /etc/pacman.conf +sed -i "s/#UseSyslog/UseSyslog/" /etc/pacman.conf +sed -i "/\#ParallelDownloads = 5/a ILoveCandy" /etc/pacman.conf +sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf +sed -i "/\[multilib\]/,/Include/"'s/^#//' /etc/pacman.conf +echo "" >> /etc/pacman.conf +echo "# Arch" >> /etc/pacman.conf +echo "[extra]" >> /etc/pacman.conf +echo "Include = /etc/pacman.d/mirrorlist-arch" >> /etc/pacman.conf +echo "[community]" >> pacman.conf +echo "Include = /etc/pacman.d/mirrorlist-arch" >> /etc/pacman.conf + +pacman -Sy +pacman-key --populate archlinux +pacman -Sy networkmanager networkmanager-runit grub os-prober efibootmgr network-manager-applet dhcpcd wireless_tools wpa_supplicant git ntfs-3g dialog sed opendoas +echo -e "${Green}Installation Done${No}" + +# Grub Install : +echo -e "${Cyan}Installing Grub Bootloader${No}" +grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id ArtixLinux +grub-mkconfig -o /boot/grub/grub.cfg +clear + +# Add User : +echo -e "${Cyan}Creating User${No}" +printf "${Green}Enter Username : " +read username +useradd -m $username +passwd $username +usermod -aG wheel,video,audio,storage,disk,network,optical $username +# Sudo : +echo -e "${Cyan}Setting Up Sudo${No}" +echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +# Doas +echo -e "${Cyan}Setting Up Doas${No}" +echo "permit persist :wheel" >> /etc/doas.conf +chown -c root:root /etc/doas.conf +chmod 0700 /etc/doas.conf + + +# Config : +echo -e "${Cyan}Configure Time and locale ${No}" +echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +echo "LANG=en_US.UTF-8" > /etc/locale.conf +echo "KEYMAP=fr" > /etc/vconsole.conf +locale-gen +printf "${Green}Enter Hostname : ${No}" +read hostname +echo $hostname > /etc/hostname +echo "127.0.0.1 localhost" >> /etc/hosts +echo "::1 localhost" >> /etc/hosts + +# Time : +ln -sf /usr/share/zoneinfo/Africa/Algiers /etc/localtime +hwclock --systohc +echo -e "${Green}System Installation Done ${No}" + +echo -e "${Green}Pre-Installation Finish Reboot now${No}" +ai3_path=/home/$username/artix_install3.sh +sed '1,/^#part3$/d' artix_install2.sh > $ai3_path +chown $username:$username $ai3_path +chmod +x $ai3_path +su -c $ai3_path -s /bin/sh $username +exit + +#part3 +# Colors : +Green='\033[0;32m' # Green +Cyan='\033[1;36m' # Cyan +No='\e[0m' +## Base : +echo -e "${Cyan}Installing Main Packages${No}" +sudo pacman -Sy xorg-server xorg-xinit xorg-xkill xorg-xsetroot xorg-xbacklight xorg-xprop polkit polkit-gnome ffmpeg x264 pulseaudio pulseaudio-alsa alsa-utils pulseaudio-bluetooth pavucontrol lightdm lightdm-runit lightdm-gtk-greeter gvfs xdg-utils xdg-user-dirs exfat-utils net-tools fzf + +## login && keybord : +echo -e "${Cyan}Enabling Services${No}" +echo -e "${Green}Installation Done ${No}" + +## yay Install : +echo -e "${Cyan}Installing Yay{No}" +cd $HOME +git clone https://aur.archlinux.org/yay-bin.git +cd yay-bin +makepkg -si + +# Cleaning : +sudo rm -rf /artix_install2.sh +echo -e "${Green}Installing Done${No}"