Skip to content

Commit edbdfb0

Browse files
committed
Software Installer & code cleanup
1 parent 24363ed commit edbdfb0

3 files changed

Lines changed: 165 additions & 47 deletions

File tree

README.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<a href="https://github.com/victor-bayas/simplyarch">
2+
<a href="https://github.com/geminis3/simplyarch">
33
<img src="img/laptop.png" alt="laptop-mockup" height="200">
44
</a>
55
<h1 align="center">SimplyArch Installer</h1>
@@ -18,7 +18,7 @@ EXPRESS OR IMPLIED
1818
- **UEFI & BIOS autodetection**
1919
### Filesystem Support
2020
- EXT4
21-
- **(NEW)** Initial BTRFS support (thanks [@lenuswalker](https://github.com/lenuswalker))
21+
- **(NEW)** Initial BTRFS support (special thanks to [@lenuswalker](https://github.com/lenuswalker))
2222
## What the base script will do ✅
2323
- Install a functional base system
2424
- Setup your keyboard, locales, timezone and hostname
@@ -30,41 +30,60 @@ EXPRESS OR IMPLIED
3030
- Install a DE/WM or any GUI application
3131
- Make questionable choices for you
3232
## How to use it 📖
33-
- Boot latest Arch Linux ISO
34-
- Load your keyboard e.g `loadkeys us-acentos`
35-
- Connect to the internet
36-
- Partition the disk with the tool of your choice
37-
- Install git `pacman -Sy git`
38-
- Clone this repo `git clone https://github.com/geminis3/simplyarch`
39-
- Run the `simplyarch.sh` file and follow on-screen instructions
33+
34+
# Boot latest Arch Linux ISO
35+
36+
# Connect to the Internet, if you're using WiFi you can do this
37+
iwctl
38+
device list
39+
station device scan
40+
station device get-networks
41+
station device connect SSID
42+
43+
# Load your keyboard layout
44+
loadkeys us-acentos
45+
46+
# Partition your disk with the tool of your choice
47+
cfdisk
48+
49+
# Install Git
50+
pacman -Sy git
51+
52+
# Clone this repo
53+
git clone https://github.com/geminis3/simplyarch
54+
55+
# Run the script and follow on-screen instructions
56+
./simplyarch.sh
57+
***
58+
4059
## And now what? ❓
4160
- Choose to `bloat` (optional)
4261
- Install drivers not included with the kernel if your hardware needs it (e.g. Nvidia, Broadcom, VAAPI, etc)
4362
- Install `xorg-core`, a DM and the DE/WM of your choice
4463
- Install any other application you need
4564
- Profit
4665
## Introducing `bloat` 🐌
47-
If you don't like the Arch way of doing stuff with the terminal we have prepared you a **completely optional** and simple post-installation script to help you finish setting up your Arch Linux system by installing a desktop environment, propietary Nvidia drivers (optional), Flatpak support and more.
66+
If you don't like the Arch way of doing stuff with the terminal we have prepared you a **completely optional** and simple post-installation script to help you finish setting up your Arch Linux system by installing a desktop environment, propietary drivers (optional), Flatpak support and more.
4867

4968
![bloat](img/bloat-banner.png)
5069

5170
### Has SimplyArch become what it swore to destroy?
5271
- **No**, select None when installation finishes to skip `bloat` and keep rolling 😇
5372
- The base SimplyArch script **will continue to be a separate component that provides only a minimal system**
5473
- **ProTip:** Review the choices `bloat.sh` will make for you
55-
### Supported desktop environments
74+
### Supported desktop environments (DE) 🖥️
5675
- GNOME (minimal install included)
5776
- KDE Plasma
5877
- Xfce
5978
- LXQt
6079
- LXDE
6180
- Cinnamon
62-
## Project file structure
81+
## Project file structure 📁
6382
- `simplyarch.sh`: our base and main script
6483
- `simple-reflector.sh`: a simple script that uses the `reflector` tool to fetch an updated list of fastest 20 mirrors, this script gets copied to the home folder on every install for convenience purposes
6584
- `bloat.sh`: the optional post-installation script
6685
- `README.md`: this file
6786
- `LICENSE.md`: MIT License
6887
- `img` folder: as the name says
69-
## I want to help SimplyArch development 🙋‍️🙋‍
88+
## I want to help SimplyArch development 🙋‍️🙋‍
7089
Feel free to open an Issue or Pull Request and I'll be happy to receive any feedback or code improvement

bloat.sh

Lines changed: 112 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
#!/bin/bash
2+
3+
# WARNING: BLOAT SHALL BE RUN AS A CHILD OF THE BASE SCRIPT BECAUSE PARU CAN'T BE RUN AS ROOT
4+
# However feel free to override the inherited user variable if you know what you're doing
5+
#user="your_username"
6+
27
clear
3-
echo ">>> SimplyArch bloat installer <<<"
8+
echo "Bloat by SimplyArch (BETA)"
9+
echo "Copyright (C) 2021 Victor Bayas"
410
echo
5-
echo "This step is COMPLETELY OPTIONAL, feel free to select None and finish the installation process"
11+
echo "NOTE: THIS STEP IS COMPLETELY OPTIONAL, feel free to select None and finish the installation process"
12+
echo
13+
echo "We'll guide you through the process of installing a DE, additional software and drivers."
614
echo
715
echo ">>> Desktop Environment <<<"
816
echo
9-
while ! [[ "$desktop" =~ ^(1|2|3|4|5|6|7|8)$ ]]
17+
while ! [[ "$desktop" =~ ^(1|2|3|4|5|6|7|8)$ ]]
1018
do
1119
echo "Please select one option:"
1220
echo "1. GNOME Minimal"
@@ -21,26 +29,26 @@ do
2129
done
2230
case $desktop in
2331
1)
24-
DEpkg="gdm gnome-shell gnome-backgrounds gnome-control-center gnome-screenshot gnome-system-monitor gnome-terminal gnome-tweak-tool nautilus gedit gnome-calculator gnome-disks"
32+
DEpkg="gdm gnome-shell gnome-backgrounds gnome-control-center gnome-screenshot gnome-system-monitor gnome-terminal gnome-tweak-tool nautilus gedit gnome-calculator gnome-disks evince"
2533
;;
2634
2)
27-
DEpkg="gdm gnome gnome-tweak-tool"
28-
;;
35+
DEpkg="gdm gnome gnome-tweak-tool"
36+
;;
2937
3)
3038
DEpkg="sddm plasma plasma-wayland-session dolphin konsole kate kcalc ark gwenview spectacle okular packagekit-qt5"
3139
;;
3240
4)
3341
DEpkg="lxdm xfce4 xfce4-goodies"
3442
;;
3543
5)
36-
DEpkg="sddm lxqt breeze-icons featherpad"
37-
;;
44+
DEpkg="sddm lxqt breeze-icons featherpad"
45+
;;
3846
6)
39-
DEpkg="lxdm lxde leafpad galculator"
40-
;;
47+
DEpkg="lxdm lxde leafpad galculator"
48+
;;
4149
7)
4250
DEpkg="lxdm cinnamon cinnamon-translations gnome-terminal"
43-
;;
51+
;;
4452
8)
4553
echo "No desktop environment will be installed."
4654
exit 0
@@ -54,30 +62,116 @@ case $desktop in
5462
arch-chroot /mnt /bin/bash -c "systemctl enable gdm.service"
5563
;;
5664
2)
57-
arch-chroot /mnt /bin/bash -c "systemctl enable gdm.service"
58-
;;
65+
arch-chroot /mnt /bin/bash -c "systemctl enable gdm.service"
66+
;;
5967
3)
6068
arch-chroot /mnt /bin/bash -c "systemctl enable sddm.service"
6169
;;
6270
4)
6371
arch-chroot /mnt /bin/bash -c "systemctl enable lxdm.service"
6472
;;
6573
5)
66-
arch-chroot /mnt /bin/bash -c "systemctl enable sddm.service"
67-
;;
74+
arch-chroot /mnt /bin/bash -c "systemctl enable sddm.service"
75+
;;
6876
6)
69-
arch-chroot /mnt /bin/bash -c "systemctl enable lxdm.service"
70-
;;
77+
arch-chroot /mnt /bin/bash -c "systemctl enable lxdm.service"
78+
;;
7179
7)
7280
arch-chroot /mnt /bin/bash -c "systemctl enable lxdm.service"
73-
;;
81+
;;
7482
esac
7583
# install KVM drivers (xf86-video-qxl is disabled due to bugs on certain DEs)
7684
vm=$(arch-chroot /mnt /bin/bash -c "systemd-detect-virt")
7785
if [[ $vm = "kvm" ]]
7886
then
7987
arch-chroot /mnt /bin/bash -c "pacman -S spice-vdagent --noconfirm --needed"
8088
fi
89+
# app installer
90+
while ! [[ "$app" =~ ^(15)$ ]]
91+
do
92+
clear
93+
echo ">>> App Installer <<<"
94+
echo
95+
echo "NOTE: Firefox was already installed on the previous step"
96+
echo
97+
echo "Please select:"
98+
echo
99+
echo ">>> Browsers"
100+
echo
101+
echo "1. Google Chrome"
102+
echo "2. Chromium"
103+
echo
104+
echo ">>> Work & Productivity"
105+
echo
106+
echo "3. LibreOffice Fresh"
107+
echo "4. Zoom"
108+
echo "5. Microsoft Teams"
109+
echo "6. Telegram Desktop"
110+
echo
111+
echo ">>> Multimedia"
112+
echo
113+
echo "7. VLC"
114+
echo "8. MPV"
115+
echo
116+
echo ">>> System Utilities"
117+
echo
118+
echo "9. GParted"
119+
echo "10. Timeshift Backup"
120+
echo
121+
echo ">>> Text Editors"
122+
echo
123+
echo "11. Visual Studio Code"
124+
echo "12. Neovim"
125+
echo "13. GNU Emacs"
126+
echo "14. Atom"
127+
echo
128+
echo "15. None / Continue to next step"
129+
read -p "App (1-15): " app
130+
case $app in
131+
1)
132+
arch-chroot /mnt /bin/bash -c "sudo -u $user paru -S google-chrome --noconfirm --needed"
133+
;;
134+
2)
135+
arch-chroot /mnt /bin/bash -c "pacman -S chromium --noconfirm --needed"
136+
;;
137+
3)
138+
arch-chroot /mnt /bin/bash -c "pacman -S libreoffice-fresh --noconfirm --needed"
139+
;;
140+
4)
141+
arch-chroot /mnt /bin/bash -c "sudo -u $user paru -S zoom --noconfirm --needed"
142+
;;
143+
5)
144+
arch-chroot /mnt /bin/bash -c "sudo -u $user paru -S teams --noconfirm --needed"
145+
;;
146+
6)
147+
arch-chroot /mnt /bin/bash -c "pacman -S telegram-desktop --noconfirm --needed"
148+
;;
149+
7)
150+
arch-chroot /mnt /bin/bash -c "pacman -S vlc --noconfirm --needed"
151+
;;
152+
8)
153+
arch-chroot /mnt /bin/bash -c "pacman -S mpv --noconfirm --needed"
154+
;;
155+
9)
156+
arch-chroot /mnt /bin/bash -c "pacman -S gparted --noconfirm --needed"
157+
;;
158+
10)
159+
arch-chroot /mnt /bin/bash -c "sudo -u $user paru -S timeshift-bin --noconfirm --needed"
160+
;;
161+
11)
162+
arch-chroot /mnt /bin/bash -c "sudo -u $user paru -S visual-studio-code-bin --noconfirm --needed"
163+
;;
164+
12)
165+
arch-chroot /mnt /bin/bash -c "pacman -S neovim --noconfirm --needed"
166+
;;
167+
13)
168+
arch-chroot /mnt /bin/bash -c "pacman -S emacs --noconfirm --needed"
169+
;;
170+
14)
171+
arch-chroot /mnt /bin/bash -c "pacman -S atom --noconfirm --needed"
172+
;;
173+
esac
174+
done
81175
clear
82176
# nvidia
83177
echo ">>> NVIDIA Support <<<"

simplyarch.sh

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/bin/bash
2+
3+
# WARNING: THIS SCRIPT USES RELATIVE FILE PATHS SO IT MUST BE RUN FROM THE SAME WORKING DIRECTORY AS THE CLONED REPO
4+
25
clear
36
echo
47
echo "Welcome to SimplyArch Installer"
58
echo "Copyright (C) 2021 Victor Bayas"
69
echo
710
echo "DISCLAIMER: THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED"
811
echo
9-
echo "WARNING: Make sure to TYPE CORRECTLY because this script won't perform any user input validation"
12+
echo "WARNING: MAKE SURE TO TYPE CORRECTLY BECAUSE THE SCRIPT WON'T PERFORM INPUT VALIDATIONS"
1013
echo
1114
echo "We'll guide you through the installation process of a functional base Arch Linux system"
1215
echo
13-
echo "\"btw btw btw btw btw btw\""
14-
echo "- a satisfied SimplyArch user"
15-
echo
1616
read -p "Do you want to continue? (Y/N): " prompt
1717
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
1818
then
@@ -46,7 +46,7 @@ then
4646
echo
4747
read -sp "Re-type password: " rootpw2
4848
echo
49-
while [[ $rootpw != $rootpw2 ]]
49+
while [[ $rootpw != "$rootpw2" ]]
5050
do
5151
echo
5252
echo "Passwords don't match. Try again"
@@ -59,11 +59,12 @@ then
5959
echo
6060
echo "Standard User"
6161
read -p "User: " user
62+
export user
6263
read -sp "Password: " userpw
6364
echo
6465
read -sp "Re-type password: " userpw2
6566
echo
66-
while [[ $userpw != $userpw2 ]]
67+
while [[ $userpw != "$userpw2" ]]
6768
do
6869
echo
6970
echo "Passwords don't match. Try again"
@@ -158,7 +159,7 @@ then
158159
echo ">>> Installing and configuring the base system <<<"
159160
echo
160161
echo "This process may take a while, please wait..."
161-
sleep 1
162+
sleep 3
162163
# Install base system
163164
if [[ -d /sys/firmware/efi ]]
164165
then
@@ -170,14 +171,14 @@ then
170171
genfstab -U /mnt >> /mnt/etc/fstab
171172
# configure base system
172173
# locales
173-
echo "$locale.UTF-8 UTF-8" >> /mnt/etc/locale.gen
174+
echo "$locale.UTF-8 UTF-8" > /mnt/etc/locale.gen
174175
arch-chroot /mnt /bin/bash -c "locale-gen"
175176
echo "LANG=$locale.UTF-8" > /mnt/etc/locale.conf
177+
# keyboard
178+
echo "KEYMAP=$keyboard" > /mnt/etc/vconsole.conf
176179
# timezone
177180
arch-chroot /mnt /bin/bash -c "ln -sf /usr/share/zoneinfo/$(curl https://ipapi.co/timezone) /etc/localtime"
178181
arch-chroot /mnt /bin/bash -c "hwclock --systohc"
179-
# keyboard
180-
echo "KEYMAP="$keyboard"" > /mnt/etc/vconsole.conf
181182
# enable multilib
182183
sed -i '93d' /mnt/etc/pacman.conf
183184
sed -i '94d' /mnt/etc/pacman.conf
@@ -211,7 +212,7 @@ then
211212
arch-chroot /mnt /bin/bash -c "/home/$user/simple_reflector.sh"
212213
clear
213214
# paru
214-
echo ">>> Post-install routine <<<"
215+
echo ">>> AUR Helper <<<"
215216
echo
216217
echo "Installing the Paru AUR Helper..."
217218
echo "cd && git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -si --noconfirm && cd && rm -rf paru-bin" | arch-chroot /mnt /bin/bash -c "su $user"
@@ -224,9 +225,13 @@ then
224225
echo
225226
echo ">>> Installation finished sucessfully <<<"
226227
echo
227-
echo "System will reboot in a moment..."
228-
sleep 3
229-
clear
230-
umount -a
231-
reboot
228+
read -p "Do you want to reboot? (Y/N): " reboot
229+
if [[ $reboot == "y" || $reboot == "Y" || $reboot == "yes" || $reboot == "Yes" ]]
230+
then
231+
echo "System will reboot in a moment..."
232+
sleep 3
233+
clear
234+
umount -a
235+
reboot
236+
fi
232237
fi

0 commit comments

Comments
 (0)