69 lines
1.3 KiB
Bash
Executable File
69 lines
1.3 KiB
Bash
Executable File
|
|
echo "Enter username"
|
|
|
|
read userName
|
|
|
|
echo "Enter hostname"
|
|
|
|
read hostName
|
|
|
|
|
|
|
|
timedatectl set-timezone Europe/Vilnius
|
|
|
|
locale-gen
|
|
echo LANG=en_US.UTF-8 > /etc/locale.conf
|
|
export LANG=en_US.UTF-8
|
|
|
|
echo $hostName > /etc/hostname
|
|
|
|
echo "127.0.0.1 localhost" >> /etc/hosts
|
|
echo "::1 localhost" >> /etc/hosts
|
|
echo "127.0.1.1 $hostName" >> /etc/hosts
|
|
|
|
useradd -m $userName
|
|
|
|
echo "Root password"
|
|
passwd
|
|
|
|
echo "$userName password"
|
|
passwd $userName
|
|
|
|
|
|
echo "Does this build use EFI? [y/N]"
|
|
|
|
read efiCheck
|
|
|
|
if [[ $efiCheck == y ]]; then
|
|
fdisk -l
|
|
echo "Enter the boot device name /dev/..."
|
|
read bootdevice
|
|
mkdir /boot/efi
|
|
mount /dev/$bootdevice /boot/efi
|
|
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
|
|
grub-mkconfig -o /boot/grub/grub.cfg
|
|
else
|
|
grub-install $(cat /proc/mounts|grep btrfs |grep ' / '|head -n 1|cut -f 1 -d ' ')
|
|
grub-mkconfig -o /boot/grub/grub.cfg
|
|
fi
|
|
|
|
systemctl enable lightdm
|
|
systemctl enable NetworkManager.service
|
|
systemctl enable systemd-resolved
|
|
|
|
cd /opt
|
|
|
|
git clone https://aur.archlinux.org/yay-git.git
|
|
chown -R $userName:$userName ./yay-git
|
|
cd ./yay-git
|
|
|
|
echo "$userName ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|
|
|
sudo -u $userName makepkg -si
|
|
|
|
yay -S --noconfirm firefox
|
|
yay -S --noconfirm vlc
|
|
yay -S --noconfirm atom-editor
|
|
|
|
|
|
exit |