-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfedora
executable file
·108 lines (80 loc) · 3.82 KB
/
fedora
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Prompt user for confirmation before proceeding
read -p "This script will setting up Fedora system after fresh install. Proceed? (y/n): " choice
case "$choice" in
y|Y ) ;;
* ) echo "Aborted."; exit;;
esac
# Set max_parallel_downloads and deltarpm in dnf.conf
printf "%s" "
max_parallel_downloads=8
deltarpm=false
" | sudo tee -a /etc/dnf/dnf.conf
# Update system packages
sudo dnf update -y
# Install RPM Fusion repositories
sudo dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# Update core packages
sudo dnf group update core -y
# Import GPG key for VSCodium repository
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
# Add VSCodium repository
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/yum.repos.d/vscodium.repo
# Install VSCodium
sudo dnf install -y codium
# Enable and install ani-cli from COPR repository
sudo dnf copr enable derisis13/ani-cli
sudo dnf install -y ani-cli
# Remove specified packages
sudo dnf remove -y gnome-text-editor gnome-maps gnome-software ffmpeg-free libswscale-free libreoffice* video rhythmbox totem
# Clean up after removal
sudo dnf autoremove -y
# Get firmware updates and refresh firmware metadata
sudo fwupdmgr get-devices
sudo fwupdmgr refresh --force
# Get and apply firmware updates
sudo fwupdmgr get-updates -y
sudo fwupdmgr update -y
# Install fedora-flathub-remote and add Flathub repository
sudo dnf install -y fedora-flathub-remote
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Install flatpak packages
flatpak install -y flathub com.mattjakeman.ExtensionManager com.github.tchx84.Flatseal com.discordapp.Discord io.github.peazip.PeaZip com.spotify.Client
# Install additional packages
sudo dnf install -y vim unrar unzip lshw fastfetch tldr ffmpeg mpv yt-dlp libexif gsmartcontrol gnome-tweaks telegram-desktop qbittorrent lynis autojump thefuck make copyq
# Install packages for devops work
sudo dnf install vagrant git java-1.8.0-openjdk maven awscli
# Add Mullvad repo and install vpn
sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
sudo dnf install mullvad-vpn
# Configure GNOME settings
gsettings set org.gnome.desktop.a11y always-show-universal-access-status true
gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu:minimize,maximize,close'
gsettings set org.gnome.desktop.interface clock-show-weekday true
gsettings set org.gnome.desktop.interface clock-show-seconds true
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
# Configure NetworkManager to randomize MAC addresses
sudo bash -c 'cat > /etc/NetworkManager/conf.d/00-macrandomize.conf' <<-'EOF'
[main]
hostname-mode=none
[device]
wifi.scan-rand-mac-address=yes
[connection]
wifi.cloned-mac-address=random
ethernet.cloned-mac-address=random
EOF
# Restart NetworkManager and set hostname
sudo systemctl restart NetworkManager
sudo hostnamectl set-hostname "localhost"
# Remove Docker older version
sudo dnf remove docker* -y
# Set up Docker repo
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
# Install Docker engine, containerd, Docker compose
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Add current user to Docker group
sudo usermod -aG docker $USER