-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch.sh
114 lines (85 loc) · 3.25 KB
/
arch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/env bash
loadkeys fr-pc # my keymap
setfont ter-132b # High-DPI screens
timedatectl
echo "EFI paritition ?"
read EFI
echo "SWAP paritition ?"
read SWAP
echo "Root(/) paritition ?"
read ROOT
echo "username ?"
read USER
echo "password ?"
read PASSWORD
echo "KDE or... NOTHING ?"
echo "1. KDE"
echo "2. NOTHING"
read DESKTOP
# make filesystems
echo -e "\nCreating Filesystems...\n"
mkfs.vfat -F32 -n "EFISYSTEM" "${EFI}"
mkswap "${SWAP}"
swapon "${SWAP}"
mkfs.ext4 -L "ROOT" "${ROOT}"
# mount target
mount -t ext4 "${ROOT}" /mnt
mkdir /mnt/boot
mount -t vfat "${EFI}" /mnt/boot/
echo "--------------------------------------"
echo "-- INSTALLING Arch Linux --"
echo "--------------------------------------"
pacstrap -K /mnt base base-devel --noconfirm --needed
# kernel
pacstrap -K /mnt linux linux-firmware linux-headers --noconfirm --needed
echo "--------------------------------------"
echo "-- Setup Dependencies and Stuff --"
echo "--------------------------------------"
pacstrap -K /mnt networkmanager wireless_tools neovim intel-ucode bluez bluez-utils sudo blueman bitwarden git firefox thunderbird kitty vlc jdk-openjdk btop protonup-qt --noconfirm --needed
# fstab
genfstab -U /mnt >>/mnt/etc/fstab
echo "--------------------------------------"
echo "-- Bootloader Installation --"
echo "--------------------------------------"
# grub
pacman -S grub efibootmgr intel-ucode --noconfirm --needed
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
# user
useradd -m $USER
usermod -aG wheel $USER
echo $USER:$PASSWORD | chpasswd
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
echo "-------------------------------------------------"
echo "-- Setup Language to EN and set locale to FR --"
echo "-------------------------------------------------"
sed -i 's/^#fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" >>/etc/locale.conf
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
hwclock --systohc
echo "arch" >/etc/hostname
echo "-------------------------------------------------"
echo "-- Display and Audio Drivers --"
echo "-------------------------------------------------"
pacman -S xorg pulseaudio --noconfirm --needed
systemctl enable NetworkManager bluetooth.service
#DESKTOP ENVIRONMENT
if [[ $DESKTOP == '1' ]]; then
pacman -S plasma kde-applications sddm --noconfirm --needed
systemctl enable sddm
else
echo "You have choosen to install desktop yourself, good luck !"
fi
echo "-------------------------------------------------"
echo "-- Setting up Pacman --"
echo "-------------------------------------------------"
sed -i 's/^#Color /Color/' /etc/pacman.conf
sed -i 's/^#ParallelDownloads = 5 /ParallelDownloads = 5/' /etc/pacman.conf
sed -i '/^ParallelDownloads = 5/a ILoveCandy' /etc/pacman.conf
sed -i 's/^#[extra-testing] /[extra-testing]/' /etc/pacman.conf
sed -i '/^\s*#\s*\[multilib\]/ s/^#//' /etc/pacman.conf
sed -i '/^\s*#Include = \/etc\/pacman\.d\/mirrorlist/ s/^#//' /etc/pacman.conf
echo "-------------------------------------------------"
echo "-- Install Complete, You can reboot now --"
echo "-------------------------------------------------"