From 15bf2fcbe8373a1d0ad8c2027ead64704d6ed7e7 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Wed, 24 Nov 2021 23:40:38 -0500 Subject: [PATCH] bootstrap.sh: Update --- bootstrap.sh | 105 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 88 insertions(+), 17 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 42a3758..6592408 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -9,33 +9,104 @@ # - Import gpg and ssh keys # TODO Check for fedora +# TODO --help to display $optional_things +# TODO run with arg to install an $optional_things # Permissive SELinux sudo sed -i "s/SELINUX=enforcing/SELINUX=permissive" /etc/selinux/config sudo setenforce 0 # config file applies upon reboots +# Update all repo and packages sudo dnf upgrade --refresh -y -# Dev -sudo dnf groupinstall -y "Development Tools" -# must install manually: ghq codium -sudo dnf install -y direnv stow -sudo dnf install -y git-email git-publish -sudo dnf install -y neovim +# RPM fusion +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 -yq -# Shell -sudo dnf install -y zsh -git clone git@git.sr.ht:~earnestma/dotfiles ~/.dotfiles # Update to ssh -chsh -s $(which zsh) -(cd ~/.dotfiles && stow */ -v) +# Install +sudo dnf install -y neovim mpv +sudo dnf install -y seahorse kleopatra # should be done already -# Mail -sudo dnf install -y aerc isync +optional_things="install_dev +install_shell_and_dots +install_mail +install_fonts +install_gnome_extras +install_gaming +install_nextcloud_client +install_discord +install_spotify +install_chrome" +extra_things="" -sudo dnf install -y seahorse kleopatra # secrets: should be done already +set_post_extra(){ + extra_things="${*}\n${extra_things}" +} -# Fonts -sudo dnf install -y jetbrains-mono-fonts-all fira-code-fonts +install_dev(){ + sudo dnf groupinstall -y "Development Tools" + sudo dnf install -y direnv stow exa fzf + sudo dnf install -y git-email git-publish -echo "All done! Restart now" + set_post_extra "Install ghq and VSCodium" +} + +install_shell_and_dots(){ + sudo dnf install -y zsh + git clone git@git.sr.ht:~earnestma/dotfiles ~/.dotfiles + chsh -s $(which zsh) + (cd ~/.dotfiles && stow */ -v) +} + +install_mail(){ + sudo dnf install -y aerc isync + + set_post_extra "Configure aerc credentials, cron and mbsync config" +} + +install_fonts(){ + sudo dnf install -y jetbrains-mono-fonts-all fira-code-fonts +} + +install_gnome_extras(){ + sudo dnf install -y gnome-extensions-app gnome-tweaks yaru-theme + gsettings set org.gnome.desktop.interface gtk-theme "Yaru-dark" + gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true + + set_post_extra "Open Tweaks and set most things in theme to Yaru (-dark)" + set_post_extra "Install extensions from https://extensions.gnome.org" +} + +install_gaming(){ + sudo dnf install -y wine winetricks steam +} + +install_nextcloud_client(){ + sudo dnf install -y nextcloud_client +} + +install_discord(){ + sudo dnf install -y discord +} + +install_spotify(){ + sudo dnf install -y lpf-spotify-client + set_post_extra "Run lpf update" +} + +install_chrome(){ + sudo dnf install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm +} + +echo "You can install:\n ${optional_things}" +for ot in $optional_things; do + read -rp "Do $ot? [Yn]" yorn + case $yorn in + Y|y) + echo "Installing $ot" + $ot ;; + *) true ;; + esac +done +echo "All done! Probably a good idea to restart now" +echo "YOU MAY NEED TO DO THE FOLLOWING:\n${extra_steps}"