From 46cdfbe486808c887c1dea8b448695765389faaa Mon Sep 17 00:00:00 2001 From: askiiart Date: Sun, 2 Jun 2024 13:57:01 -0500 Subject: [PATCH] fix missing virt-manager dep, add rate-mirrors for arch, fix errors in git and fish scripts --- daily-use-pcs/setup-git.bash | 3 +++ distro-specific.bash | 13 +++++++++++-- dotfiles | 2 +- install-stuff/install-fish.bash | 2 +- install-stuff/install-qemu-libvirt.bash | 3 ++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/daily-use-pcs/setup-git.bash b/daily-use-pcs/setup-git.bash index 4b2bc56..27c82af 100755 --- a/daily-use-pcs/setup-git.bash +++ b/daily-use-pcs/setup-git.bash @@ -42,6 +42,9 @@ git config --global user.email "${GIT_EMAIL}" git config --global commit.gpgsign true git config --global user.signingkey ${KEY_ID} +# other git settings +git config --global init.defaultBranch main + # From https://superuser.com/a/954639 # Archived at https://web.archive.org/web/20230606153856/https://superuser.com/a/954639 echo Fixing .gnupg/ permissions diff --git a/distro-specific.bash b/distro-specific.bash index 0090bdf..3c04835 100755 --- a/distro-specific.bash +++ b/distro-specific.bash @@ -9,10 +9,12 @@ command_exists() { type "$1" &>/dev/null; } if command_exists "apt-get"; then sudo apt update sudo apt install curl -y + 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 + elif command_exists "pacman"; then WD=$(pwd) sudo pacman -S --noconfirm --needed git base-devel @@ -21,15 +23,20 @@ elif command_exists "pacman"; then makepkg -si cd $WD rm -rf yay + # get fast arch mirrors + yay -S rate-mirrors-bin + rate-mirrors --disable-comments-in-file --entry-country=US --protocol=https arch --max-delay 7200 | sudo tee /etc/pacman.d/mirrorlist yay -S noto-fonts-emoji --noconfirm --needed - #sudo mkdir /usr/share/fonts/meslolgs - #yay -S ttf-meslo-nerd-font-powerlevel10k --noconfirm --needed + elif command_exists "zypp"; then echo "not yet implemented" + elif command_exists "emerge"; then echo "not yet implemented" + elif command_exists "apk"; then echo "not yet implemented" + elif command_exists "xbps-install"; then sudo xbps-install NetworkManager dbus polkit polkit-gnome nano noto-fonts-emoji noto-fonts-cjk python3 python3-pip mkdir ~/Applications @@ -39,6 +46,8 @@ elif command_exists "xbps-install"; then cd - echo "AppImageLauncher is in ~/Applications, deal with it yourself or update this script" sudo xbps-install void-repo-multilib void-repo-nonfree + else echo "Unsupported: unknown package manager and distro" + fi diff --git a/dotfiles b/dotfiles index ab89154..f5b7c87 160000 --- a/dotfiles +++ b/dotfiles @@ -1 +1 @@ -Subproject commit ab891546112053b37bf2cacc682b9480d7670d0d +Subproject commit f5b7c874281ffdcd4e3780915383773cc84686ca diff --git a/install-stuff/install-fish.bash b/install-stuff/install-fish.bash index e15053e..069d9c9 100755 --- a/install-stuff/install-fish.bash +++ b/install-stuff/install-fish.bash @@ -13,7 +13,7 @@ if command_exists "apt-get"; then elif command_exists "yum"; then sudo yum install fish -y elif command_exists "pacman"; then - pacman -S fish + sudo pacman -S fish elif command_exists "zypp"; then # Untested sudo zypper install fish -y diff --git a/install-stuff/install-qemu-libvirt.bash b/install-stuff/install-qemu-libvirt.bash index 77f41cb..8cdaf67 100755 --- a/install-stuff/install-qemu-libvirt.bash +++ b/install-stuff/install-qemu-libvirt.bash @@ -14,8 +14,9 @@ elif command_exists "yum"; then sudo systemctl enable --now libvirtd.service sudo usermod -aG libvirt $(whoami) elif command_exists "pacman"; then - sudo pacman -S qemu-full --noconfirm --needed + sudo pacman -S qemu-full dnsmasq --noconfirm --needed sudo pacman -S virt-manager --noconfirm --needed + sudo systemctl enable --now libvirtd.service elif command_exists "zypp"; then # Untested sudo zypper install qemu -y