#!/bin/bash

# >> First run setup
	FIRSTRUN="/snap"
	if [ ! -d "$FIRSTRUN" ]; then

## SNAP & Flatpak (2023.01.27)
	sudo dnf install snapd -y
	sudo ln -s /var/lib/snapd/snap /snap
	sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo


## DNF fastest mirror (2023.01.27)
	echo "fastestmirror=true" | sudo tee -a /etc/dnf/dnf.conf
	echo "deltarpm=true" | sudo tee -a /etc/dnf/dnf.conf
	sudo dnf clean all -y


## Update installation (2023.01.27)
	sudo dnf upgrade -y


## Setup RPM fusion repo's (2023.01.27)
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 -y
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1
sudo dnf update @core -y
sudo dnf swap ffmpeg-free ffmpeg --allowerasing -y
sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
sudo dnf install intel-media-driver -y
sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld -y
sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld -y
sudo dnf install rpmfusion-free-release-tainted -y
sudo dnf install libdvdcss -y
sudo dnf install rpmfusion-nonfree-release-tainted -y
sudo dnf --repo=rpmfusion-nonfree-tainted install "*-firmware" -y
sudo dnf update -y


## << End of first run
	echo "============================================"
	echo "          Reboot in 10."
	echo "============================================"
	sleep 10
	reboot
	else




## Cockpit (2023.01.27)
sudo dnf install cockpit -y
sudo dnf install cockpit-* -y


# D
## Dia Diagram Editor (2023.01.27)
sudo dnf install dia -y


# F
## fedy (2023.01.27) - https://github.com/rpmfusion-infra/fedy
sudo dnf copr enable kwizart/fedy -y
sudo dnf install fedy -y


## Flatseal (2023.01.27) https://github.com/tchx84/Flatseal
sudo flatpak install flathub com.github.tchx84.Flatseal -y


# K
## Kate Programming IDE (2023.01.27)
sudo dnf install kate -y



# L
## lolcat (2023.01.27) - https://github.com/busyloop/lolcat
sudo dnf install lolcat -y


## Libre office Dansk (2023.01.27)
sudo dnf install libreoffice-langpack-da -y


## sl (2023.01.27) - https://github.com/mtoyoda/sl
sudo dnf install sl -y


# V
## Video Lan (2023.01.27)
sudo dnf install vlc -y

## Vim (2023.01.27)
sudo dnf install vim -y

## Virtual Manager (2023.01.27)
sudo dnf group install virtualization -y

cd ~/Downloads
dnf install wget -y
wget https://mirrors.dotsrc.org/centos-stream/10-stream/BaseOS/x86_64/iso/CentOS-Stream-10-latest-x86_64-dvd1.iso
wget https://mirrors.dotsrc.org/fedora/linux/releases/41/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-41-1.4.iso

sl
# << End of else
	fi
