bootstrap.sh: Update

pull/1/head
earnest ma 2021-11-24 23:40:38 -05:00
parent 41a682e862
commit 15bf2fcbe8
Signed by: earnest ma
GPG Key ID: A343F43342EB6E2A
1 changed files with 88 additions and 17 deletions

View File

@ -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
# Install
sudo dnf install -y neovim mpv
sudo dnf install -y seahorse kleopatra # should be done already
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=""
set_post_extra(){
extra_things="${*}\n${extra_things}"
}
install_dev(){
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y direnv stow exa fzf
sudo dnf install -y git-email git-publish
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 # Update to ssh
git clone git@git.sr.ht:~earnestma/dotfiles ~/.dotfiles
chsh -s $(which zsh)
(cd ~/.dotfiles && stow */ -v)
}
# Mail
install_mail(){
sudo dnf install -y aerc isync
sudo dnf install -y seahorse kleopatra # secrets: should be done already
set_post_extra "Configure aerc credentials, cron and mbsync config"
}
# Fonts
install_fonts(){
sudo dnf install -y jetbrains-mono-fonts-all fira-code-fonts
}
echo "All done! Restart now"
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}"