From cdfc2d8e15207e3611c79abd284765de250606fb Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 31 Oct 2021 15:29:00 +0100 Subject: Initial commit --- install-arch.sh | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 install-arch.sh diff --git a/install-arch.sh b/install-arch.sh new file mode 100644 index 0000000..0901675 --- /dev/null +++ b/install-arch.sh @@ -0,0 +1,130 @@ +#!/bin/sh + +# # +# Pre-Script Setup +# # + +# loadkeys de-latin1 + +# fdisk /dev/$DISK +# new partition +# set bootable +# new partition swap +# mkfs.ext4 /dev/$PART +# mkswap /dev/$SWAP + +# iwctl --passphrase $PHRASE wlan0 connect $SSID + + +PART= +SWAP=false +USER=dweipert + +OPTS=$(getopt -o '' -l 'part:,swap::,user::' -- "$@") +eval set -- "$OPTS" + +while true; do + case "$1" in + --part) PART="$2"; shift 2 ;; + --swap) SWAP="$2"; shift 2 ;; + --user) USER="$2"; shift 2 ;; + --) shift; break ;; + *) echo "ERROR"; break ;; + esac +done + + +mount /dev/$PART /mnt +$SWAP && swapon /dev/$SWAP + +timedatectl set-ntp true + +reflector --country Germany --protocol https --latest 5 --save /etc/pacman.d/mirrorlist + +pacstrap /mnt base base-devel linux linux-firmware iwd dhcpcd + +genfstab -U /mnt >> /mnt/etc/fstab + + +# # +# Pre chroot +# # + +sed -i 's/#de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /mnt/etc/locale.gen +sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /mnt/etc/locale.gen + + +# # +# chroot +# # + +arch-chroot /mnt + +ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime +hwclock --systohc + +locale-gen +echo "LANG=de_DE.UTF-8" > /etc/locale.conf + +echo "KEYMAP=de-latin1" > /etc/vconsole.conf + +echo "archbook" > /etc/hostname + +echo "127.0.0.1 localhost" >> /etc/hosts +echo "::1 localhost" >> /etc/hosts +echo "127.0.0.1 archbook.local archbook" >> /etc/hosts + +# create user +useradd -G wheel -m $USER +passwd $USER + +systemctl enable iwd +systemctl enable dhcpcd + +echo "DONE" +echo "SETUP BOOTLOADER YOURSELF" +exit + + +# # +# Post Install +# # + +# Desktop +sudo pacman -Sy \ + sway alacritty waybar xorg-xwayland rofi \ + zsh nvim imv grim nnn \ + pipewire pipewire-pulse cups cups-pdf \ + qutebrowser + +mkdir -p $HOME/Applications +mkdir -p $HOME/Documents +mkdir -p $HOME/Downloads +mkdir -p $HOME/Images + +# AUR +REPO="[options] +CacheDir = /var/cache/pacman/pkg +CacheDir = /var/cache/pacman/aurutils +CleanMethod = KeepCurrent + +[aurutils] +SigLevel = Optional TrustAll +Server = file:///var/cache/pacman/aurutils" +sudo echo $REPO >> /etc/pacman.d/aurutils +sudo echo "Include /etc/pacman.d/aurutils" >> /etc/pacman.conf + +sudo install -d /var/cache/pacman/aurutils -o $USER +repo-add /var/cache/pacman/aurutils/aurutils.db.tar + +sudo pacman -Syu + +git clone https://aur.archlinux.org/aurutils.git $HOME/Applications/aurutils +cd $HOME/Applications/aurutils +makepkg -irs + +# dotfiles +aur sync yadm-git +sudo pacman -Sy yadm-git +yadm clone --bootstrap https://gitlab.com/drogueronin/dotfiles + -- cgit v1.2.3