116 lines
2.9 KiB
Bash
Executable File
116 lines
2.9 KiB
Bash
Executable File
#!/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
|
|
# 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/g" /etc/selinux/config
|
|
sudo setenforce 0 # config file applies upon reboots
|
|
|
|
# Update all repo and packages
|
|
sudo dnf upgrade --refresh -y
|
|
|
|
# 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
|
|
|
|
# Flatpak
|
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
|
|
# Install
|
|
sudo dnf install -y neovim mpv util-linux-user xclip
|
|
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 fd-find ripgrep shellcheck
|
|
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
|
|
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}"
|
|
|