Skip to content

Instantly share code, notes, and snippets.

@code-inflation
Forked from danielkrash/fedora_setup.sh
Last active June 5, 2022 13:01
Show Gist options
  • Select an option

  • Save code-inflation/754d65c95f6d1f63d1efa01d689ec7e9 to your computer and use it in GitHub Desktop.

Select an option

Save code-inflation/754d65c95f6d1f63d1efa01d689ec7e9 to your computer and use it in GitHub Desktop.
Things to do after installing Fedora
#!/usr/bin/env bash
# ---------------------------------------------
# This has been updated to work with Fedora 36
# ---------------------------------------------
# Run a System Update
sudo dnf update
# Enable RPM Fusion
sudo rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# Enable Fastest Mirror, Maximum Parallel Downloads and Delta RPM
echo "fastestmirror=true" | sudo tee -a /etc/dnf/dnf.conf
echo "max_parallel_downloads=5" | sudo tee -a /etc/dnf/dnf.conf
echo "deltarpm=true" | sudo tee -a /etc/dnf/dnf.conf
# Multimedia plugins for audio and video
sudo dnf group upgrade --with-optional Multimedia
# Development Tools
sudo dnf groupinstall "Development Tools" "Development Libraries"
# Tweaks and Extentions
sudo dnf install gnome-tweaks
sudo dnf install gnome-extensions-app
# Set hostname
echo "Let's setup a new hostname"
read -rp 'hostname: ' myhostname
sudo hostnamectl set-hostname "$myhostname"
# configure flatpak & flathub
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak update
# other applications
## Multimedia apps
sudo dnf install mpv vlc audacity kdenlive -y
## utilities
sudo dnf install htop tmux jq bat neofetch install util-linux-user -y
### setup tmux
curl https://gist.githubusercontent.com/code-inflation/96dee4f31fb70b048fe700ac5d59340a/raw/85ad0308cfc7e3db0c912f0fb108d6a4f5ef9e9f/.tmux.conf -o .tmux.conf
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
### todo start tmux; Press prefix + I (capital i, as in Install) to fetch the plugin.
## golang
sudo dnf install golang -y
# Text Editors
## vim
sudo dnf install vim -y
## VS Code
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' && \
sudo dnf check-update && \
sudo dnf install code -y
# web browsers
## google chrome
sudo dnf install fedora-workstation-repositories -y && \
sudo dnf config-manager --set-enabled google-chrome && \
sudo dnf install google-chrome-stable -y
# ZSH
## core
sudo dnf install zsh -y
## ohmyzsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
## powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sed 's/robbyrussell/powerlevel10k\/powerlevel10k/g' -i ~/.zshrc
## powerline fonts
sudo dnf install tmux-powerline vim-powerline powerline-fonts
wget https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
sudo mv -v PowerlineSymbols.otf /usr/share/fonts/
sudo mv -v MesloLGS*.ttf /usr/share/fonts/
sudo fc-cache -vf
sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d/
## zsh plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
## set user shell
chsh -s $(which zsh)
## minimize, maximize buttons
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
# openSSL
sudo dnf install openssl
## yt-dlp
python3 -m pip install -U yt-dlp
## Docker
sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
# Verify that Docker Engine is installed correctly by running the hello-world image.
sudo docker run hello-world
# do stuff to allow docker to run as non-root
# see https://docs.docker.com/engine/install/linux-postinstall/#next-steps
## Create the docker group.
sudo groupadd docker
# Add your user to the docker group.
sudo usermod -aG docker $USER
# Log out and log back in so that your group membership is re-evaluated.
# you can also run the following command to activate the changes to groups
newgrp docker
# Verify that you can run docker commands without sudo:
docker run hello-world
# Configure Docker to start on boot
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
### Other packages / utils
sudo dnf install pandoc ShellCheck ocrmypdf pdftk wkhtmltopdf screenkey -y
# setup logiops
sudo dnf install cmake libevdev-devel systemd-devel libconfig-devel gcc-c++ -y
git clone https://github.com/PixlOne/logiops.git
cd logiops
mkdir build
cd build
cmake ..
make
sudo make install
curl https://gist.githubusercontent.com/code-inflation/81cd7a2f0cb6d031335ad7f20073ee24/raw/e0b45a9760a49f6ae78983660424937094999179/logid.cfg -o /etc/logid.cfg
sudo systemctl enable --now logid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment