Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Void linux support #986

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/Developer-tools/meld-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ installMeld() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add meld
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y meld
;;
*)
checkFlatpak
flatpak install -y flathub org.gnome.meld
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/Developer-tools/neovim-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ installNeovim() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add neovim ripgrep fzf py3-virtualenv luarocks go shellcheck git
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y neovim ripgrep fzf python3-virtualenv luarocks go shellcheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/Developer-tools/vscode-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ installVsCode() {
printf "%b\n" '[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc' | "$ESCALATION_TOOL" tee /etc/yum.repos.d/vscode.repo > /dev/null
"$ESCALATION_TOOL" "$PACKAGER" install -y code
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y vscode
;;
apk)
checkFlatpak
flatpak install -y flathub com.visualstudio.code
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/alacritty-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installAlacritty() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add alacritty
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y alacritty
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y alacritty
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/android-debloat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ install_adb() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add android-tools
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y android-tools
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ if ! command_exists chromium; then
apk)
"$ESCALATION_TOOL" "$PACKAGER" add chromium
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y chromium
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ installFirefox() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y firefox
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add firefox
;;
Expand Down
4 changes: 4 additions & 0 deletions core/tabs/applications-setup/browsers/librewolf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
pacman)
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
;;
xbps-install)
printf '%s\n' 'repository=https://github.com/index-0/librewolf-void/releases/latest/download/' | "$ESCALATION_TOOL" tee /etc/xbps.d/20-librewolf.conf > /dev/null
"$ESCALATION_TOOL" "$PACKAGER" -Syu librewolf
;;
apk)
checkFlatpak
flatpak install flathub io.gitlab.librewolf-community
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/lynx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installLynx() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add lynx
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y lynx
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y lynx
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/tor-browser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ installTorBrowser() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y torbrowser-launcher
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y torbrowser-launcher
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}"
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ installDiscord() {
"$ESCALATION_TOOL" "$PACKAGER" install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
"$ESCALATION_TOOL" "$PACKAGER" install -y discord
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y Signal-Desktop
;;
apk)
checkFlatpak
flatpak install -y flathub com.discordapp.Discord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ installSignal() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm signal-desktop
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y Signal-Desktop
;;
dnf)
checkFlatpak
flatpak install -y flathub org.signal.Signal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installTelegram() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add telegram-desktop
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y telegram-desktop
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y telegram-desktop
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installThunderBird() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add thunderbird
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y thunderbird
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y thunderbird
;;
Expand Down
6 changes: 6 additions & 0 deletions core/tabs/applications-setup/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ install_docker() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add docker
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y docker
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down Expand Up @@ -80,6 +83,9 @@ install_docker_compose() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add docker-cli-compose
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y docker-compose
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/fastfetch-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ installFastfetch() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add fastfetch
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y fastfetch
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/kitty-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installKitty() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add kitty
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y kitty
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y kitty
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/mybash-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ installDepend() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add bash bash-completion tar bat tree unzip fontconfig git
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y bash bash-completion tar bat tree unzip fontconfig git
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/office-suites/libreoffice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ installLibreOffice() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add libreoffice
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y libreoffice
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/pdf-suites/evince.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installEvince() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add evince
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y evince
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y evince
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/pdf-suites/okular.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installOkular() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add okular
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y okular
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y okular
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/podman-compose-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ installPodmanCompose() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y podman-compose
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y podman-compose
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/podman-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ installPodman() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y podman
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y podman
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/rofi-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installRofi() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add rofi
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y rofi
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y rofi
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/zsh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ installZsh() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add zsh
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y zsh
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y zsh
;;
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/common-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ checkEnv() {
checkArch
checkEscalationTool
checkCommandRequirements "curl groups $ESCALATION_TOOL"
checkPackageManager 'nala apt-get dnf pacman zypper apk'
checkPackageManager 'nala apt-get dnf pacman zypper apk xbps-install'
checkCurrentDirectoryWritable
checkSuperUser
checkDistro
Expand Down
21 changes: 19 additions & 2 deletions core/tabs/common-service-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ startService() {
rc-service)
"$ESCALATION_TOOL" "$INIT_MANAGER" "$1" start
;;
runit)
"$ESCALATION_TOOL" sv start "$1"
;;
esac
}

Expand All @@ -34,6 +37,9 @@ stopService() {
rc-service)
"$ESCALATION_TOOL" "$INIT_MANAGER" "$1" stop
;;
runit)
"$ESCALATION_TOOL" sv stop "$1"
;;
esac
}

Expand All @@ -45,6 +51,11 @@ enableService() {
rc-service)
"$ESCALATION_TOOL" rc-update add "$1"
;;
runit)
"$ESCALATION_TOOL" mkdir -p "/run/runit/supervise.$1"
"$ESCALATION_TOOL" ln -sf "/etc/sv/$1" "/var/service/"
sleep 5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay. why is it sleeping here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gives it time to set up the supervision. I had it set at 2 but it was failing. Seems to work at 5.

Copy link
Collaborator

@adamperkowski adamperkowski Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't really like this approach to be honest. is there no other way? i don't understand the logic here.

;;
esac
}

Expand All @@ -56,6 +67,9 @@ disableService() {
rc-service)
"$ESCALATION_TOOL" rc-update del "$1"
;;
runit)
"$ESCALATION_TOOL" rm -f "/var/service/$1"
;;
esac
}

Expand All @@ -64,7 +78,7 @@ startAndEnableService() {
systemctl)
"$ESCALATION_TOOL" "$INIT_MANAGER" enable --now "$1"
;;
rc-service)
rc-service|runit)
enableService "$1"
startService "$1"
;;
Expand All @@ -79,7 +93,10 @@ isServiceActive() {
rc-service)
"$ESCALATION_TOOL" "$INIT_MANAGER" "$1" status --quiet
;;
runit)
"$ESCALATION_TOOL" sv status "$1" >/dev/null 2>&1
;;
esac
}

checkInitManager 'systemctl rc-service'
checkInitManager 'systemctl rc-service runit'
3 changes: 3 additions & 0 deletions core/tabs/security/firewall-baselines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installPkg() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add ufw
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y ufw
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y ufw
;;
Expand Down
7 changes: 7 additions & 0 deletions core/tabs/system-setup/compile-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ installDepend() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" add build-base multitail tar tree trash-cli unzip cmake jq
;;
xbps-install)
COMPILEDEPS='base-devel'
"$ESCALATION_TOOL" "$PACKAGER" -y $DEPENDENCIES $COMPILEDEPS
"$ESCALATION_TOOL" "$PACKAGER" -y void-repo-multilib
"$ESCALATION_TOOL" "$PACKAGER" -Sy
"$ESCALATION_TOOL" "$PACKAGER" -y glibc-32bit gcc-multilib
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/system-setup/global-theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ install_theme_tools() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm qt6ct kvantum
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -y qt6ct kvantum
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/system-setup/system-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ cleanup_system() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" cache clean
;;
xbps-install)
"$ESCALATION_TOOL" xbps-remove -Oo
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}. Skipping.${RC}"
;;
Expand Down
6 changes: 6 additions & 0 deletions core/tabs/system-setup/system-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ fastUpdate() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" update
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -S
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}"
exit 1
Expand All @@ -82,6 +85,9 @@ updateSystem() {
apk)
"$ESCALATION_TOOL" "$PACKAGER" upgrade
;;
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -Su
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}"
exit 1
Expand Down
Loading