diff --git a/daily-use-pcs/setup-git.bash b/daily-use-pcs/setup-git.bash index 27c82af..a7f57f7 100755 --- a/daily-use-pcs/setup-git.bash +++ b/daily-use-pcs/setup-git.bash @@ -1,6 +1,4 @@ #!/usr/bin/env bash -# Exit if there's an error -set -e # Modify constants as needed GIT_NAME="askiiart" GIT_EMAIL="dev@askiiart.net" @@ -20,6 +18,10 @@ if command_exists "apt-get"; then sudo apt-get install git -y elif command_exists "yum"; then sudo yum install git -y +elif command_exists "rpm-ostree" && ! command_exists "git"; then + rpm-ostree install git -y + read -p "Press enter to reboot, then run do-everything.bash again" + reboot elif command_exists "pacman"; then sudo pacman -S git --noconfirm --needed elif command_exists "zypp"; then diff --git a/distro-specific.bash b/distro-specific.bash index 3c04835..bb5c630 100755 --- a/distro-specific.bash +++ b/distro-specific.bash @@ -13,7 +13,13 @@ if command_exists "apt-get"; then elif command_exists "dnf"; then sudo dnf config-manager --add-repo https://askiiart.net/repos/fedora/x86_64/askiiart.repo sudo dnf remove libreoffice* atril -y - sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y + +elif command_exists "rpm-ostree"; then + sudo wget https://askiiart.net/repos/fedora/x86_64/askiiart.repo -O /etc/yum.repos.d/askiiart.repo + rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y + sudo rpm-ostree apply-live --allow-replacement + flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo elif command_exists "pacman"; then WD=$(pwd) diff --git a/do-everything.bash b/do-everything.bash index c54f96f..9a39b05 100755 --- a/do-everything.bash +++ b/do-everything.bash @@ -1,4 +1,6 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash + +command_exists() { type "$1" &>/dev/null; } chmod 700 ./distro-specific.bash ./distro-specific.bash @@ -10,7 +12,6 @@ cd .. cd install-stuff/ chmod 700 ./*.bash -./install-vesktop.bash ./install-claws-mail.bash ./install-fish.bash ./install-librewolf.bash @@ -18,11 +19,17 @@ chmod 700 ./*.bash ./install-qemu-libvirt.bash ./install-steam.bash ./install-vs-code.bash -./install-yt-music.bash ./install-fonts.bash +./install-yt-music.bash +./install-vesktop.bash cd .. cd ./dotfiles chmod 700 restore.sh ./restore.sh cd .. + +if command_exists "rpm-ostree"; then + read -p "Press enter to reboot" + reboot +fi \ No newline at end of file diff --git a/dotfiles b/dotfiles index f5b7c87..3110da2 160000 --- a/dotfiles +++ b/dotfiles @@ -1 +1 @@ -Subproject commit f5b7c874281ffdcd4e3780915383773cc84686ca +Subproject commit 3110da2e40b77caf275c95b368ab97d47982faa4 diff --git a/install-stuff/install-claws-mail.bash b/install-stuff/install-claws-mail.bash index 3774387..735927e 100755 --- a/install-stuff/install-claws-mail.bash +++ b/install-stuff/install-claws-mail.bash @@ -1,5 +1,4 @@ #!/usr/bin/env bash -EDITOR=nano if [ $(whoami) == "root" ]; then echo "Run as a normal user, not root" @@ -20,6 +19,17 @@ elif command_exists "dnf"; then cd ~ git clone https://git.askiiart.net/askiiart/gpg-email-helper cd - +elif command_exists "rpm-ostree"; then + if ! command_exists "spamassassin"; then + rpm-ostree install spamassassin claws-mail claws-mail-plugins-pgp claws-mail-plugins-spamassassin claws-mail-plugins-rssyl + read -p "Press enter to reboot, then run do-everything.bash again" + reboot + else + sudo systemctl enable --now spamassassin.service + cd ~ + git clone https://git.askiiart.net/askiiart/gpg-email-helper + cd - + fi elif command_exists "xbps-install"; then sudo xbps-install claws-mail spamassassin ln -s /etc/sv/spamd /var/service/ diff --git a/install-stuff/install-fish.bash b/install-stuff/install-fish.bash index 069d9c9..7ada69f 100755 --- a/install-stuff/install-fish.bash +++ b/install-stuff/install-fish.bash @@ -12,6 +12,10 @@ if command_exists "apt-get"; then sudo apt-get install fish -y elif command_exists "yum"; then sudo yum install fish -y +elif command_exists "rpm-ostree" && ! command_exists "fish"; then + rpm-ostree install fish -y + read -p "Press enter to reboot, then run do-everything.bash again" + reboot elif command_exists "pacman"; then sudo pacman -S fish elif command_exists "zypp"; then diff --git a/install-stuff/install-librewolf.bash b/install-stuff/install-librewolf.bash index 9820893..95fe8e6 100755 --- a/install-stuff/install-librewolf.bash +++ b/install-stuff/install-librewolf.bash @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -e if [ $(whoami) == "root" ]; then echo "Run as a normal user, not root" exit 1 @@ -32,6 +31,33 @@ elif command_exists "dnf"; then rm -rf ./tmp-openh264/ echo -e "\nNow open LibreWolf, go to about:config, and set these to true:\n media.gmp-gmpopenh264.autoupdate\n media.gmp-gmpopenh264.enabled\n media.gmp-gmpopenh264.provider.enabled\n media.peerconnection.video.h264_enabled\n" read -p "" +elif command_exists "rpm-ostree"; then + if ! command_exists "librewolf"; then + sudo wget https://rpm.librewolf.net/librewolf-repo.repo -O /etc/yum.repos.d/librewolf.repo + rpm-ostree install librewolf + rpm-ostree remove firefox + read -p "Press enter to reboot, then run do-everything.bash again" + reboot + else + librewolf & + sleep 5 + pkill librewolf + mkdir tmp-openh264 + cd tmp-openh264 + wget http://ciscobinary.openh264.org/openh264-linux64-v1.1-Firefox33.zip + rpm-ostree install unzip -y + rpm-ostree apply-live + unzip ./*.zip + for dir in $(ls -d ~/.librewolf/*/); do + mkdir -p ${dir}gmp-gmpopenh264/1.1/ + cp libgmpopenh264.so ${dir}gmp-gmpopenh264/1.1/ + cp gmpopenh264.info ${dir}gmp-gmpopenh264/1.1/ + done + cd - + rm -rf ./tmp-openh264/ + echo -e "\nNow open LibreWolf, go to about:config, and set these to true:\n media.gmp-gmpopenh264.autoupdate\n media.gmp-gmpopenh264.enabled\n media.gmp-gmpopenh264.provider.enabled\n media.peerconnection.video.h264_enabled\n" + read -p "" + fi elif command_exists "yay"; then yay -S librewolf-bin yay -R firefox diff --git a/install-stuff/install-misc.sh b/install-stuff/install-misc.sh index f051141..2495d55 100755 --- a/install-stuff/install-misc.sh +++ b/install-stuff/install-misc.sh @@ -19,6 +19,14 @@ elif command_exists "dnf"; then # Install Prism Launcher sudo dnf copr enable g3tchoo/prismlauncher sudo dnf install prismlauncher-qt5 +elif command_exists "rpm-ostree"; then + rpm-ostree install kitty neovim gcc gnome-hexgl drawing make vlc freeglut ncdu gcolor3 rustup clippy p7zip mosh krita podman podman-docker podman-compose gajim progress yt-dlp genisoimage zstd iperf3 -y --allow-inactive + + # Install Prism Launcher + sudo wget https://copr.fedorainfracloud.org/coprs/g3tchoo/prismlauncher/repo/fedora-$(rpm -E %fedora)/g3tchoo-prismlauncher-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/g3tchoo-prismlauncher.repo + rpm-ostree install prismlauncher-qt5 + + flatpak install me.iepure.devtoolbox elif command_exists "yay"; then yay -S kitty neovim gcc vlc ncdu gcolor3 rustup p7zip mosh krita podman podman-compose gajim progress yt-dlp genisoimage drawing clippy gnome-hexgl zstd iperf3 unzip schildichat-desktop-bin digikam man-db prismlauncher-qt5-bin progress --noconfirm --needed elif command_exists "zypp"; then diff --git a/install-stuff/install-qemu-libvirt.bash b/install-stuff/install-qemu-libvirt.bash index 8cdaf67..ff516c7 100755 --- a/install-stuff/install-qemu-libvirt.bash +++ b/install-stuff/install-qemu-libvirt.bash @@ -13,6 +13,14 @@ elif command_exists "yum"; then sudo yum install @Virtualization virt-manager -y sudo systemctl enable --now libvirtd.service sudo usermod -aG libvirt $(whoami) +elif command_exists "rpm-ostree"; then + if ! command_exists "libvirtd"; then + rpm-ostree install virt-install libvirt-daemon-config-network libvirt-daemon-kvm qemu-kvm virt-manager virt-viewer + read -p "Press enter to reboot, then run do-everything.bash again" + reboot + else + sudo systemctl enable --now libvirtd.service + fi elif command_exists "pacman"; then sudo pacman -S qemu-full dnsmasq --noconfirm --needed sudo pacman -S virt-manager --noconfirm --needed diff --git a/install-stuff/install-steam.bash b/install-stuff/install-steam.bash index c38d411..e1028ed 100755 --- a/install-stuff/install-steam.bash +++ b/install-stuff/install-steam.bash @@ -21,7 +21,12 @@ elif command_exists "dnf"; then AppImageLauncherSettings & sleep 5 kill $(pidof AppImageLauncherSettings) - sudo dnf install gperftools-libs-2.9.1-6.fc39.i686 + sudo dnf install gperftools-libs-2.14-3.fc40.i686 +elif command_exists "rpm-ostree"; then + rpm-ostree install steam -y + rpm-ostree install qt5-qtbase-gui -y + flatpak install net.davidotek.pupgui2 + rpm-ostree install gperftools-libs-2.14-3.fc40.i686 elif command_exists "yay"; then #printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' #read -p "Enable the multilib repo in /etc/pacman.conf - look above" diff --git a/install-stuff/install-vesktop.bash b/install-stuff/install-vesktop.bash index 6efe39e..40f9f9f 100755 --- a/install-stuff/install-vesktop.bash +++ b/install-stuff/install-vesktop.bash @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -e if [ $(whoami) == "root" ]; then echo "Run as a normal user, not root" exit 1 @@ -10,10 +9,10 @@ command_exists() { type "$1" &>/dev/null; } if command_exists "apt-get"; then curl -LO $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "vesktop_.*_amd64.deb" | head --lines 1 | cut -d : -f 2,3 | tr -d \") sudo apt-get install ./vesktop_*.deb -y -elif command_exists "yum"; then - curl -LO $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "browser_download_url.*vesktop-.*.x86_64.rpm" | head --lines 1 | cut -d : -f 2,3 | tr -d \") - sudo dnf install ./vesktop-*.rpm -y - rm ./vesktop-*.rpm +elif command_exists "dnf"; then + sudo dnf install $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "browser_download_url.*vesktop-.*.x86_64.rpm" | head --lines 1 | cut -d : -f 2,3 | tr -d \") +elif command_exists "rpm-ostree"; then + rpm-ostree install $(curl -s https://api.github.com/repos/Vencord/Vesktop/releases/latest | grep "browser_download_url.*vesktop-.*.x86_64.rpm" | head --lines 1 | cut -d : -f 2,3 | tr -d \") elif command_exists "yay"; then yay -S vesktop-bin --noconfirm --needed elif command_exists "xbps-install"; then diff --git a/install-stuff/install-vs-code.bash b/install-stuff/install-vs-code.bash index bd8bea1..fe4d597 100755 --- a/install-stuff/install-vs-code.bash +++ b/install-stuff/install-vs-code.bash @@ -20,6 +20,12 @@ elif command_exists "dnf"; then sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' sudo dnf install code -y +elif command_exists "rpm-ostree" && ! command_exists "code"; then + curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import + sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' + rpm-ostree install code -y + read -p "Press enter to reboot, then run do-everything.bash again" + reboot elif command_exists "yay"; then yay -S visual-studio-code-bin clang-format-static-bin --noconfirm --needed elif command_exists "zypp"; then diff --git a/install-stuff/install-yt-music.bash b/install-stuff/install-yt-music.bash index 02cf6ec..7d9b5a0 100755 --- a/install-stuff/install-yt-music.bash +++ b/install-stuff/install-yt-music.bash @@ -14,6 +14,9 @@ if command_exists "apt-get"; then elif command_exists "yum"; then sudo dnf config-manager --add-repo https://askiiart.net/repos/fedora/x86_64/askiiart.repo sudo dnf install youtube-music -y +elif command_exists "rpm-ostree"; then + sudo wget https://askiiart.net/repos/fedora/x86_64/askiiart.repo -O /etc/yum.repos.d/askiiart.repo + rpm-ostree install youtube-music -y elif command_exists "yay"; then yay -S youtube-music-bin --noconfirm --needed elif command_exists "xbps-install"; then