From 7fe80823b7229b9e2c7878e2840a579ce7fa012e Mon Sep 17 00:00:00 2001 From: teldra Date: Tue, 8 Feb 2022 19:53:21 +0100 Subject: [PATCH] progress --- etc/base | 9 ++++----- etc/functions | 37 +++++++++++++++++++------------------ etc/gfx/amd | 2 +- etc/gfx/intel | 2 +- etc/gfx/nvidia | 2 +- etc/network/networkmanager | 1 + etc/printing/cups | 6 +++++- etc/profile/gnome | 32 ++++++++++++++++++++++++++++++++ etc/profile/plasma | 24 ++++++++++++++++++++++-- etc/soundsystem/pipewire | 5 +++-- etc/soundsystem/pulseaudio | 4 ++-- etc/xserver/x11 | 13 +++++++++++-- 12 files changed, 102 insertions(+), 35 deletions(-) diff --git a/etc/base b/etc/base index 4b7d69e..07a08f0 100644 --- a/etc/base +++ b/etc/base @@ -1,5 +1,6 @@ packages() { - addpkg base-system lvm2 cryptsetup htop wireguard-tools sudo neovim nano xtools btrbk cronie git ntp socklog-void + addpkg base-system sudo void-repo-multilib-nonfree void-repo-nonfree lvm2 cronie socklog-void ntp xtools wireguard-tools gnupg progress pwgen net-tools ncdu nmap mtr bind-utils iotop hdparm smartmontools htop git neovim btrbk croc grub-btrfs nano mbuffer cryptsetup psmisc pinentry-tty + ignorepkg nvi } config() { @@ -21,10 +22,8 @@ echo "KEYMAP=${L2}" > /etc/vconsole.conf xbps-reconfigure -f glibc-locales - - -enable_service cronie isc-ntpd udevd socklog-unix nanoklogd - +enable_service acpid cronie socklog-unix nanoklogd uuidd agetty-tty1 agetty-tty2 agetty-tty3 agetty-tty4 isc-ntpd udevd +service_disable agetty-tty6 agetty-tty5 cat < /etc/fstab tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 /dev/mapper/vg_${TARGETNAME_UNDERSCORE}-root / btrfs defaults,subvol=rootfs 0 0 diff --git a/etc/functions b/etc/functions index a7df81b..9fbd89f 100644 --- a/etc/functions +++ b/etc/functions @@ -4,23 +4,6 @@ err() { exit 1 } -input_old() { - local input - local found="0" - echo "$1 $2" - read input - for i in $2; do - if [ "$i" == "$input" ]; then - found=1 - fi - done - if [ "$found" == "0" ]; then - err "$input: $3" - return 1 - fi - output="$input" -} - header() { if [ "$DEBUG" ]; then echo please enter enter @@ -44,6 +27,13 @@ enable_service() { done } +disable_service() { + for i in $@; do + rm -rf /etc/runit/runsvdir/default/${i} + rm -rf /var/service/${i} + done +} + reset() { if [ "$1" == "config" ]; then function config() { :; } @@ -142,4 +132,15 @@ readin() { reset packages cp ./etc/${WHICH}/$output $tmp_target fi -} \ No newline at end of file +} + +ignorepkg() { + local input=( ${@} ) + for i in $(seq 0 "$(( ${#input[@]} - 1 ))"); do + touch "${target}"/etc/xbps.d/10-ignore-pkg.conf + if ! grep -q "${i}" "${target}"/etc/xbps.d/10-ignore-pkg.conf; then + echo "ignorepkg=${i}" >> "${target}"/etc/xbps.d/10-ignore-pkg.conf + fi + + done +} diff --git a/etc/gfx/amd b/etc/gfx/amd index b9747a2..1eee21f 100644 --- a/etc/gfx/amd +++ b/etc/gfx/amd @@ -1,3 +1,3 @@ packages() { - X11_MODULE="mesa-vulkan-radeon xf86-video-amdgpu mesa-vaapi mesa-vdpau zsh" + addpkg mesa-vulkan-radeon xf86-video-amdgpu mesa-vaapi mesa-vdpau zsh } \ No newline at end of file diff --git a/etc/gfx/intel b/etc/gfx/intel index 6ab85f0..02cef17 100644 --- a/etc/gfx/intel +++ b/etc/gfx/intel @@ -1,3 +1,3 @@ packages() { - X11_MODULE="mesa-vulkan-intel xf86-video-intel intel-video-accel" + addpkg mesa-vulkan-intel xf86-video-intel intel-video-accel } \ No newline at end of file diff --git a/etc/gfx/nvidia b/etc/gfx/nvidia index 3d1fe11..d46acec 100644 --- a/etc/gfx/nvidia +++ b/etc/gfx/nvidia @@ -1,3 +1,3 @@ packages() { - X11_MODULE="nvidia" + addpkg nvidia } \ No newline at end of file diff --git a/etc/network/networkmanager b/etc/network/networkmanager index 1410350..cca9492 100644 --- a/etc/network/networkmanager +++ b/etc/network/networkmanager @@ -4,4 +4,5 @@ packages() { config() { enable_service dbus NetworkManager + disable_service dhcpcd } \ No newline at end of file diff --git a/etc/printing/cups b/etc/printing/cups index 231666d..fb85bc6 100644 --- a/etc/printing/cups +++ b/etc/printing/cups @@ -1,3 +1,7 @@ packages() { - addpkg "cups" + addpkg cups cups-filters gutenprint foomatic-db +} + +config() { + service_enable cupsd } \ No newline at end of file diff --git a/etc/profile/gnome b/etc/profile/gnome index e69de29..518cbc3 100644 --- a/etc/profile/gnome +++ b/etc/profile/gnome @@ -0,0 +1,32 @@ +packages() { + email=thunderbird-i18n-de + terminal=gnome-terminal + imageviewer=eog + pdf=evince + filemanager=nautilus + archiver=file-roller + screenshot=gnome-screenshot + calc=gnome-calculator + pinentry=pinentry-gnome + keyring=gnome-keyring + gpg=seahorse + policykit=polkit-gnome + sshaskpass=gnome-ssh-askpass + partmanager=partitionmanager + dm=gdm + de=gnome + + misc="" + + + need_xserver=1 + need_gfx=1 + need_sound=1 +} + +config() { + enable_service dbus gdm + if ! [ "$LANGUAGE" == "en" ]; then + echo "export LANG=${L1}.UTF-8" > /etc/sv/gdm/conf + fi +} \ No newline at end of file diff --git a/etc/profile/plasma b/etc/profile/plasma index c45de5b..c44e4b9 100644 --- a/etc/profile/plasma +++ b/etc/profile/plasma @@ -1,10 +1,30 @@ packages() { - addpkg sddm kde5 konsole dolphin kdeconnect okular spectacle kcalc kleopatra gwenview ark filelight + email=kmail + terminal=konsole + imageviewer=gwenview + pdf=okular + filemanager=dolphin + archiver=ark + screenshot=spectacle + calc=kcalc + pinentry=pinentry-qt + keyring=kwalletmanager + gpg=kleopatra + policykit=polkit-kde-agent + sshaskpass=ksshaskpass + partmanager=partitionmanager + dm=sddm + de=kde5 + + misc="kdegraphics-thumbnailers ffmpegthumbs print-manager plasma-browser-integration kdeconnect" + need_xserver=1 + need_gfx=1 + need_sound=1 } config() { - enable_service "sddm" + enable_service dbus sddm if ! [ "$LANGUAGE" == "en" ]; then echo "export LANG=${L1}.UTF-8" > /etc/sv/sddm/conf fi diff --git a/etc/soundsystem/pipewire b/etc/soundsystem/pipewire index 388ccd9..5dbf06f 100644 --- a/etc/soundsystem/pipewire +++ b/etc/soundsystem/pipewire @@ -1,9 +1,9 @@ packages() { - addpkg pipewire alsa-utils + addpkg pipewire alsa-pipewire libjack-pipewire } config() { - enable_service alsa + enable_service echo "[Desktop Entry]" > /etc/xdg/autostart/pipewire-session.desktop echo "Version=1.0" >> /etc/xdg/autostart/pipewire-session.desktop @@ -35,4 +35,5 @@ config() { echo "X-GNOME-Autostart-Phase=Initialization" >> /etc/xdg/autostart/pipewire.desktop echo "X-KDE-autostart-phase=1" >> /etc/xdg/autostart/pipewire.desktop + echo "/usr/lib/pipewire-0.3/jack" > /etc/ld.so.conf.d/zpipewire-jack.conf } \ No newline at end of file diff --git a/etc/soundsystem/pulseaudio b/etc/soundsystem/pulseaudio index 91053b7..4daf9ad 100644 --- a/etc/soundsystem/pulseaudio +++ b/etc/soundsystem/pulseaudio @@ -1,7 +1,7 @@ packages() { - addpkg pulseaudio alsa-utils + addpkg alsa-plugins-pulseaudio pulseaudio } config() { - enable_service alsa + enable_service } \ No newline at end of file diff --git a/etc/xserver/x11 b/etc/xserver/x11 index 0220bef..f9dfb7f 100644 --- a/etc/xserver/x11 +++ b/etc/xserver/x11 @@ -1,14 +1,23 @@ packages() { - addpkg xorg-minimal xorg-apps xorg-fonts dbus "${X11_MODULE}" + addpkg xorg-minimal xorg-apps xorg-fonts dbus noto-fonts-emoji mesa-dri vulkan-loader addpkg "firefox-i18n-${LANGUAGE}" addpkg libreoffice-writer libreoffice-calc "libreoffice-i18n-${LANGUAGE}" addpkg "thunderbird-i18n-${LANGUAGE}" addpkg element-desktop addpkg vlc yt-dlp + addpkg alsa-utils + addpkg "aspell-${LANGUAGE}" gspell + + addpkg ${email} ${terminal} ${imageviewer} ${pdf} ${filemanager} ${archiver} ${screenshot} ${calc} ${pinentry} ${keyring} ${gpg} ${policykit} ${sshaskpass} ${partmanager} ${dm} ${de} ${misc} + + + ignorepkg font-adobe-75dpi font-adobe-100dpi } + config() { - enable_service dbus + enable_service dbus alsa + disable_service acpid ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/ if [ "$LANGUAGE" == "de" ]; then