Skip to content

Commit a0e0004

Browse files
committed
Select init system
1 parent 099f43b commit a0e0004

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

choices.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,14 @@ elif [[ "$gpu_choice" == "amd" ]]; then
9393
echo "AMD GPU selected, the driver will be installed automatically."
9494
fi
9595

96-
# 8. Yay installation option
96+
# 8. Init system choice
97+
init_system=$(ask_option "Which init system would you like to install?" "openrc" "runit openrc s6 dinit")
98+
99+
# 9. Yay installation option
97100
yay_choice=$(ask_yes_no "Do you want to install Yay?" "Y")
98101

99-
# 9. Extra packages (separate with spaces)
100-
read -p "Enter any extra packages (e.g., sddm sddm-runit plasma fastfetch): " extra_packages
102+
# 10. Extra packages (separate with spaces)
103+
read -p "Enter any extra packages (e.g., sddm plasma fastfetch): " extra_packages
101104

102105
# Now we will save these details to a file
103106
cat > install_info.sh <<EOF
@@ -110,6 +113,7 @@ kernel_choice="$kernel_choice"
110113
cpu_choice="$cpu_choice"
111114
gpu_choice="$gpu_choice"
112115
nvidia_driver_choice="$nvidia_driver_choice"
116+
init_system="$init_system"
113117
yay_choice="$yay_choice"
114118
extra_packages="$extra_packages"
115119
EOF

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fi
235235
# ---------------------------
236236
# 9. Install base system
237237
# ---------------------------
238-
packages=(base base-devel runit elogind-runit "${kernel_choice}" linux-firmware "${cpu_choice}-ucode" nano)
238+
packages=(base base-devel "${init_system}" "elogind-${init_system}" "${kernel_choice}" linux-firmware "${cpu_choice}-ucode" nano)
239239
if [ "${is_btrfs:-false}" == "true" ]; then
240240
packages+=(btrfs-progs)
241241
fi
@@ -292,7 +292,7 @@ run_in_chroot "bash -c 'printf \"root:%s\n\" \"$rootpass\" | chpasswd'"
292292
# ---------------------------
293293
# 15. Install core packages & GRUB
294294
# ---------------------------
295-
run_in_chroot "pacman -S --noconfirm grub efibootmgr networkmanager networkmanager-runit network-manager-applet dosfstools ${kernel_choice}-headers bluez bluez-utils bluez-runit xdg-utils xdg-user-dirs"
295+
run_in_chroot "pacman -S --noconfirm grub efibootmgr networkmanager networkmanager-${init_system} network-manager-applet dosfstools ${kernel_choice}-headers bluez bluez-utils bluez-${init_system} xdg-utils xdg-user-dirs"
296296
run_in_chroot "grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB"
297297
run_in_chroot "grub-mkconfig -o /boot/grub/grub.cfg"
298298

0 commit comments

Comments
 (0)