Dong Nguyen
Fedora

Setup new Fedora

#!/bin/sh

# sudo visudo
# ndaidong ALL=(ALL) NOPASSWD: ALL

sudo dnf update && sudo dnf upgrade
# reboot

# nvidia driver
# https://rpmfusion.org/Howto/NVIDIA
sudo dnf install akmod-nvidia
sudo dnf mark user akmod-nvidia # againt dnf autoremove
sudo dnf install xorg-x11-drv-nvidia-cuda # for cuda/nvdec/nvenc support
sudo dnf install xorg-x11-drv-nvidia-cuda-libs # for ffmpeg compiled with NVENC/NVDEC 
# check
/sbin/lspci | grep -e VGA
sudo dnf install nvtop

# chmod 0400 ~/.ssh/ndd*
# source ~/.bash_profile

sudo dnf install -y htop tilix vim duf

# config tilix
dconf load /com/gexperts/Tilix/ < terminix.dconf

# pomodoro
# sudo dnf install gnome-pomodoro

#  word & excel alternative
# sudo dnf install -y abiword gnumeric

# sqlite3
sudo dnf install -y sqlitebrowser

# media
sudo dnf install -y audacious gthumb
sudo dnf install -y gimp kolourpaint vlc
# sudo dnf install -y breeze-icons noto-fonts-emoji

# python utils
sudo dnf install -y python3-pip
pip3 install pipx
pipx ensurepath
pipx install yt-dlp
pipx install poetry
pipx install flake8

# Gnome extensions:
# https://extensions.gnome.org/extension/7332/status-icons/

# gocryptfs
export GOCRYPT_VER=2.5.2
wget https://github.com/rfjakob/gocryptfs/releases/download/v${GOCRYPT_VER}/gocryptfs_v${GOCRYPT_VER}_linux-static_amd64.tar.gz
tar zxvf gocryptfs_v${GOCRYPT_VER}_linux-static_amd64.tar.gz
rm gocryptfs_v${GOCRYPT_VER}_linux-static_amd64.tar.gz
sudo mv gocryptfs* /usr/local/bin/
vim ~/.gocryptfs.conf
mkdir ~/desync
# gocryptfs -config ~/.gocryptfs.conf /storage/data/psync/encrypted ~/desync/

# docker
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

sudo usermod -aG docker ndaidong
newgrp docker

sudo systemctl start docker.service
sudo systemctl enable docker.service

sudo curl -SL https://github.com/docker/compose/releases/download/v2.34.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

# brave browser
sudo dnf install dnf-plugins-core
sudo dnf config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
sudo dnf install -y brave-browser

# sublime
sudo dnf config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
sudo dnf install -y sublime-text

# git config
git config --global user.name "Dong Nguyen"
git config --global user.email "[email protected]"
git config --global core.editor "nano"
git config --global pull.rebase false
git config --global pull.ff only
git config --global push.autoSetupRemote true
git config --global init.defaultBranch main

git clone --recursive [email protected]:ndaidong/vim.git ~/.vim

sudo mkdir /opt/engines
sudo chown -R ndaidong:ndaidong /opt/engines
sudo mkdir /opt/tools
sudo chown -R ndaidong:ndaidong /opt/tools
sudo mkdir /workspace
sudo chown -R ndaidong:ndaidong /workspace

# increase the open files limit
# ulimit -n 65536
sudo vim /etc/security/limits.conf
##################################################
*               soft    nofile          65536
*               hard    nofile          65536
##################################################
# check
ulimit -a

echo "DONE"