From 2f7c9e2370901c336bfa4eca6f9931d544671343 Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 7 Feb 2022 02:34:12 +0100 Subject: [PATCH] progress --- etc/base | 7 ++++ etc/de/gnome | 0 etc/de/plasma | 8 +++++ etc/gfx/amd | 0 etc/gfx/intel | 0 etc/gfx/nvidia | 0 etc/soundsystem/pipewire | 0 etc/soundsystem/pulseaudio | 0 functions | 12 ++++++- main.sh | 74 ++++++++++++++++++++++++++++++++++---- 10 files changed, 94 insertions(+), 7 deletions(-) create mode 100644 etc/base create mode 100644 etc/de/gnome create mode 100644 etc/de/plasma create mode 100644 etc/gfx/amd create mode 100644 etc/gfx/intel create mode 100644 etc/gfx/nvidia create mode 100644 etc/soundsystem/pipewire create mode 100644 etc/soundsystem/pulseaudio diff --git a/etc/base b/etc/base new file mode 100644 index 0000000..271e8ac --- /dev/null +++ b/etc/base @@ -0,0 +1,7 @@ +packages() { + addpkg base-system lvm2 cryptsetup htop tmux wireguard-tools +} + +config() { + : +} \ No newline at end of file diff --git a/etc/de/gnome b/etc/de/gnome new file mode 100644 index 0000000..e69de29 diff --git a/etc/de/plasma b/etc/de/plasma new file mode 100644 index 0000000..abba5ae --- /dev/null +++ b/etc/de/plasma @@ -0,0 +1,8 @@ +packages() { + addpkg sddm kde5 +} + +config() { + enable_service "sddm" + echo "export LANG=${L1}.UTF-8" > /etc/sv/sddm/conf +} \ No newline at end of file diff --git a/etc/gfx/amd b/etc/gfx/amd new file mode 100644 index 0000000..e69de29 diff --git a/etc/gfx/intel b/etc/gfx/intel new file mode 100644 index 0000000..e69de29 diff --git a/etc/gfx/nvidia b/etc/gfx/nvidia new file mode 100644 index 0000000..e69de29 diff --git a/etc/soundsystem/pipewire b/etc/soundsystem/pipewire new file mode 100644 index 0000000..e69de29 diff --git a/etc/soundsystem/pulseaudio b/etc/soundsystem/pulseaudio new file mode 100644 index 0000000..e69de29 diff --git a/functions b/functions index 5027bac..324a1a6 100644 --- a/functions +++ b/functions @@ -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/ } \ No newline at end of file diff --git a/main.sh b/main.sh index 5b91eb0..fb728d9 100644 --- a/main.sh +++ b/main.sh @@ -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 \ No newline at end of file