-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpostinstall.sh
More file actions
executable file
·40 lines (26 loc) · 850 Bytes
/
postinstall.sh
File metadata and controls
executable file
·40 lines (26 loc) · 850 Bytes
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
#!/bin/bash
set -e
trap 'echo "\"${last_command}\" command failed with exit code $?."' EXIT
#ROOTPASSWD=
#USERNAME=
#USERPASSWD=
printf "$ROOTPASSWD\n$ROOTPASSWD" | passwd
useradd -m -G wheel $USERNAME
printf "$USERPASSWD\n$USERPASSWD" | passwd $USERNAME
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
echo $USERPASSWD | sudo -u $USERNAME chsh -s /usr/bin/zsh
systemctl enable NetworkManager
systemctl enable bluetooth
systemctl enable libvirtd
systemctl enable sddm
if [ -z "$1" ]
then
echo "Device not set!"
else
grub-install $1 --efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg
fi
pacman -Sy
git clone https://aur.archlinux.org/paru.git /tmp/paru && cd /tmp/paru && chown $USERNAME . -R && sudo -u $USERNAME makepkg -si --noconfirm
sudo -u $USERNAME paru -S --noconfirm - < /postinst/aurpackages.txt
exit