dotfiles/bootstrap.sh

116 lines
2.9 KiB
Bash
Raw Normal View History

2021-11-22 13:36:24 -05:00
#!/usr/bin/env bash
# A rough approximation of what I did to set my system up, only the basics
# that apply to any Fedora/ spin.
# If a command starts to fail, pick up manually where it left off I guess?
# DO BEFORE RUNNING:
# RUN sudo dnf install -y seahorse kleopatra
# - Import gpg and ssh keys
# TODO Check for fedora
2021-11-24 23:40:38 -05:00
# TODO --help to display $optional_things
# TODO run with arg to install an $optional_things
2021-11-22 13:36:24 -05:00
# Permissive SELinux
sudo sed -i "s/SELINUX=enforcing/SELINUX=permissive/g" /etc/selinux/config
2021-11-22 13:36:24 -05:00
sudo setenforce 0 # config file applies upon reboots
2021-11-24 23:40:38 -05:00
# Update all repo and packages
2021-11-22 13:36:24 -05:00
sudo dnf upgrade --refresh -y
2021-11-24 23:40:38 -05:00
# 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
2021-11-22 13:36:24 -05:00
2021-12-06 22:04:21 -05:00
# Flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
2021-11-24 23:40:38 -05:00
# Install
sudo dnf install -y neovim mpv util-linux-user xclip
2021-11-24 23:40:38 -05:00
sudo dnf install -y seahorse kleopatra # should be done already
2021-11-22 13:36:24 -05:00
2021-11-24 23:40:38 -05:00
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=""
2021-11-22 13:36:24 -05:00
2021-11-24 23:40:38 -05:00
set_post_extra(){
extra_things="${*}\n${extra_things}"
}
2021-11-22 13:36:24 -05:00
2021-11-24 23:40:38 -05:00
install_dev(){
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y direnv stow exa fzf fd-find ripgrep shellcheck
2021-11-24 23:40:38 -05:00
sudo dnf install -y git-email git-publish
2021-11-22 13:36:24 -05:00
2021-11-24 23:40:38 -05:00
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
2021-11-24 23:40:38 -05:00
}
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}"
2021-11-22 13:36:24 -05:00