Created
August 6, 2021 17:08
-
-
Save dtomvan/9b62b8d0ab96617ac1dc28b97127a781 to your computer and use it in GitHub Desktop.
Arch install
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/sh | |
set -e | |
ls /sys/firmware/efi/efivars && systemctl start iwd && iwctl | |
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || echo error | |
echo "/dev/sda1: efi sys 200mib; /dev/sda2 swap 4gib; /dev/sda3 ext4 the rest" | |
parted --script /dev/sda \ | |
mklabel gpt \ | |
mkpart primary fat32 1MiB 200MiB \ | |
set 1 esp on \ | |
mkpart primary linux-swap 200MiB 4296MiB \ | |
mkpart primary ext4 4296MiB 100% | |
mkfs.vfat /dev/sda1 | |
mkswap /dev/sda2 | |
mkfs.ext4 /dev/sda3 | |
mount /dev/sda3 /mnt | |
swapon /dev/sda2 | |
pacman -Sy archlinux-keyring | |
pacstrap /mnt base linux linux-firmware linux-headers linux-api-headers nvidia nvidia-settings vim vi rustup tmux base-devel awesome man-db man-pages texinfo iwd sudo grub efibootmgr efivar zsh fish intel-ucode amd-ucode picom xorg git xplr dhclient gdisk | |
arch-chroot /mnt pacman -Sc --noconfirm | |
genfstab -U /mnt >> /mnt/etc/fstab | |
cat <<EOF > /mnt/root/part2.sh | |
mount /dev/sda1 /mnt | |
echo "%wheel ALL=(ALL) ALL \n Defaults passwd_timeout=0" | |
cat | |
EDITOR=vim visudo | |
ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime | |
hwclock --systohc | |
timedatectl set-ntp true | |
timedatectl set-timezone Europe/Amsterdam | |
echo "en_US.UTF-8 UTF-8" | |
cat | |
vim /etc/locale.gen | |
locale-gen | |
echo "LANG=en_US.UTF-8" > vim /etc/locale.conf | |
echo "tom-pc" > /etc/hostname | |
echo "127.0.0.1 localhost tom-pc" >> /etc/hosts | |
passwd | |
useradd -m -G wheel -s /bin/zsh tomvd | |
passwd tomvd | |
cd /home/tomvd | |
git clone https://aur.archlinux.org/yay-bin.git | |
chown tomvd /home/tomvd/yay-bin -R | |
cd yay-bin | |
sudo -u tomvd makepkg -si | |
cd .. | |
git clone https://gitlab.com/dwt1/st-distrotube.git | |
cd st-distrotube | |
chown tomvd . -R | |
make clean install | |
git clone https://github.com/dtomvan/.config /home/tomvd/DotFiles --recursive | |
chown tomvd /home/tomvd/DotFiles -R | |
# mv /home/tomvd/.config/zsh/* /home/tomvd | |
sudo -u tomvd yay -Sy ly xdg-user-dirs pulseaudio pulseaudio-alsa pavucontrol ttf-bitstream-vera gnu-free-fonts firefox ttf-ms-fonts noto-fonts-emoji ttf-joypixels emacs texlive-most pandoc ttf-hack ttf-jetbrains-mono ttf-fira-code nerd-fonts-hack nerd-fonts-jetbrains-mono nerd-fonts-fira-code lxappearance neovim-nightly-bin ly feh stow discord_arch_electron dmenu fd fzf ripgrep git-lfs github-cli gnome-font-viewer libxft-bgra maim nettle obs-studio npm rust-analyzer teams tbsm volumeicon arc-solid-gtk-theme gtk-engine-murrine | |
yay -Sc | |
xdg-user-dirs-update | |
cd /home/tomvd/DotFiles | |
sudo -u tomvd stow */ | |
mount /dev/sda1 /mnt | |
grub-install --efi-directory=/mnt --target=x86_64-efi --bootloader-id=GRUB | |
grub-mkconfig -o /boot/grub/grub.cfg | |
mkinitcpio -P | |
exit # to leave the chroot | |
EOF | |
chmod 777 /mnt/root/part2.sh | |
arch-chroot /mnt /root/part2.sh | |
echo Done |
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/sh | |
set -e | |
ls /sys/firmware/efi/efivars && systemctl start iwd && iwctl | |
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || echo error | |
echo "/dev/sda1: efi sys 200mib; /dev/sda2 swap 4gib; /dev/sda3 ext4 the rest" | |
parted --script /dev/sda \ | |
mklabel gpt \ | |
mkpart primary fat32 1MiB 200MiB \ | |
set 1 esp on \ | |
mkpart primary linux-swap 200MiB 4296MiB \ | |
mkpart primary ext4 4296MiB 100% | |
mkfs.vfat /dev/sda1 | |
mkswap /dev/sda2 | |
mkfs.ext4 /dev/sda3 | |
mount /dev/sda3 /mnt | |
swapon /dev/sda2 | |
pacman -Sy archlinux-keyring | |
pacstrap /mnt base linux linux-firmware linux-headers linux-api-headers nvidia nvidia-settings vim vi rustup tmux base-devel awesome man-db man-pages texinfo iwd sudo refind efibootmgr efivar zsh fish intel-ucode amd-ucode picom xorg git xplr dhclient gdisk | |
arch-chroot /mnt pacman -Sc --noconfirm | |
genfstab -U /mnt >> /mnt/etc/fstab | |
cat <<EOF > /mnt/root/part2.sh | |
mount /dev/sda1 /mnt | |
echo "%wheel ALL=(ALL) ALL \n Defaults passwd_timeout=0" | |
cat | |
EDITOR=vim visudo | |
ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime | |
hwclock --systohc | |
timedatectl set-ntp true | |
timedatectl set-timezone Europe/Amsterdam | |
echo "en_US.UTF-8 UTF-8" | |
cat | |
vim /etc/locale.gen | |
locale-gen | |
echo "LANG=en_US.UTF-8" | |
cat | |
vim /etc/locale.conf # LANG=en_US.UTF-8 | |
vim /etc/hostname | |
vim /etc/hosts | |
passwd | |
useradd -m -G wheel -s /bin/zsh tomvd | |
passwd tomvd | |
cd /home/tomvd | |
git clone https://aur.archlinux.org/yay-bin.git | |
chown tomvd /home/tomvd/yay-bin -R | |
cd yay-bin | |
sudo -u tomvd makepkg -si | |
cd .. | |
git clone https://gitlab.com/dwt1/st-distrotube.git | |
cd st-distrotube | |
chown tomvd . -R | |
make clean install | |
git clone https://github.com/dtomvan/.config /home/tomvd/DotFiles --recursive | |
chown tomvd /home/tomvd/DotFiles -R | |
sudo -u tomvd yay -Sy ly xdg-user-dirs pulseaudio pulseaudio-alsa pavucontrol ttf-bitstream-vera gnu-free-fonts firefox ttf-ms-fonts noto-fonts-emoji ttf-joypixels emacs texlive-most pandoc ttf-hack ttf-jetbrains-mono ttf-fira-code nerd-fonts-hack nerd-fonts-jetbrains-mono nerd-fonts-fira-code lxappearance neovim-nightly-bin ly feh stow discord_arch_electron dmenu fd fzf ripgrep git-lfs github-cli gnome-font-viewer libxft-bgra maim nettle obs-studio npm rust-analyzer teams tbsm volumeicon arc-solid-gtk-theme gtk-engine-murrine | |
pacman -Sc | |
xdg-user-dirs-update | |
cd /home/tomvd/DotFiles | |
sudo -u tomvd stow */ | |
refind-install | |
mkinitcpio -P | |
exit # to leave the chroot | |
EOF | |
chmod 777 /mnt/root/part2.sh | |
arch-chroot /mnt /root/part2.sh | |
echo MAKE SURE TO EDIT /etc/refind_linux.conf BEFORE REBOOTING | |
echo Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment