This commit is contained in:
teldra 2022-02-07 02:34:12 +01:00
parent caebb2c1d6
commit 2f7c9e2370
10 changed files with 94 additions and 7 deletions

7
etc/base Normal file
View File

@ -0,0 +1,7 @@
packages() {
addpkg base-system lvm2 cryptsetup htop tmux wireguard-tools
}
config() {
:
}

0
etc/de/gnome Normal file
View File

8
etc/de/plasma Normal file
View File

@ -0,0 +1,8 @@
packages() {
addpkg sddm kde5
}
config() {
enable_service "sddm"
echo "export LANG=${L1}.UTF-8" > /etc/sv/sddm/conf
}

0
etc/gfx/amd Normal file
View File

0
etc/gfx/intel Normal file
View File

0
etc/gfx/nvidia Normal file
View File

0
etc/soundsystem/pipewire Normal file
View File

View File

View File

@ -22,6 +22,16 @@ input() {
}
header() {
echo ""
clear
echo "#### $1"
}
addpkg() {
for i in $@; do
pkgs+="$i"
done
}
enable_service() {
ln -s /etc/sv/$1 /etc/runit/runsvdir/default/
}

74
main.sh
View File

@ -102,7 +102,6 @@ do_partition() {
mkfs.vfat -F32 ${TARGET_PHY_WWN}-part1
TARGET_PART="2"
else
set -x
parted -a optimal $TARGET_PHY_WWN -s -- mklabel msdos
TARGET_PART="1"
if [ "$ENCRYPTION_STYLE" == "b" ] || [ "$ENCRYPTION_STYLE" == "e" ]; then
@ -142,14 +141,77 @@ do_partition() {
fi
}
user() {
input "Username?" "voiduser" "unknown error"
USERNAME=$output
}
gfx() {
input "Which GFX System?" "amd nvidia intel" "unknown error"
GFX=$output
. etc/gfx/$GFX
packages
}
soundsystem() {
input "Which Soundsystem" "pulseaudio pipewire" "unknown error"
SOUNDSYSTEM=$output
. etc/gfx/$SOUNDSYSTEM
packages
}
base() {
. etc/base
packages
}
de() {
input "Which Desktop Environment?" "plasma gnome minimal" "unknown error"
DE=$output
if ! [ "$DE" == "minimal" ]; then
gfx
soundsystem
. etc/gfx/$DE
packages
fi
}
printing() {
input "Do you want printing?" "yes no" "unknown error"
if [ "$output" == "yes" ]; then
addpkg cups
fi
}
lang() {
input "Which language?" "de en" "unknown error"
if [ "$output" == "de" ]; then
L1=de_DE
elif [ "$output" == "de" ]; then
L1=en_US
fi
}
bootloader() {
if [ "$EFI" == "1" ]; then
addpkg grub-x86_64-efi dracut-uefi
else
addpkg grub
fi
}
do_install() {
echo xbps-install -Sy -R https://alpha.de.repo.voidlinux.org/current -r $target ${pkgs[@]}
}
target_phy_disk
target_phy_id
use_efi
encryption_style
hibernation
user
base
bootloader
de
do_partition
do_install