-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallation.sh
More file actions
269 lines (219 loc) · 8.5 KB
/
Copy pathinstallation.sh
File metadata and controls
269 lines (219 loc) · 8.5 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# Check for sudo
if ! command -v sudo &> /dev/null; then
echo "sudo is not installed. Please install sudo and try again."
exit 1
fi
# Remove power save for speakers
line='options snd_hda_intel power_save=0 power_save_controller=N'
conf='/etc/modprobe.d/snd_hda_intel.conf'
grep -qxF "$line" "$conf" || echo "$line" | sudo tee -a "$conf" >/dev/null
# Set volume step
echo "Setting volume step..."
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-step 2
# Check volume step
echo "Checking volume step..."
gsettings get org.gnome.settings-daemon.plugins.media-keys volume-step
# Update system
echo "Updating system..."
sudo dnf upgrade --refresh -y
# Install RPM Fusion repositories for free and non-free software
fedora_ver="$(rpm -E %fedora)"
echo "Installing RPM Fusion repositories..."
sudo dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${fedora_ver}.noarch.rpm
sudo dnf install -y https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${fedora_ver}.noarch.rpm
# Import 1Password GPG key
sudo rpm --import https://downloads.1password.com/linux/keys/1password.asc
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"https://downloads.1password.com/linux/keys/1password.asc\"" > /etc/yum.repos.d/1password.repo'
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc &&
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\nautorefresh=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
sudo dnf config-manager addrepo --from-repofile https://download.docker.com/linux/fedora/docker-ce.repo
# Update system
echo "Updating system..."
sudo dnf upgrade --refresh -y
# Install necessary tools
echo "Installing necessary tools..."
sudo dnf clean all
sudo dnf install -y \
git \
gedit \
curl \
1password \
wget \
vim \
nano \
net-tools \
zip \
unzip \
tar \
jq \
ripgrep \
fd-find \
fzf \
bat \
tmux \
git-delta \
code \
yq \
openssl-devel \
libicu \
gnome-tweaks \
steam \
fastfetch \
java-latest-openjdk \
ca-certificates \
p11-kit \
p11-kit-trust \
nss-tools \
openssl \
powerline-fonts
sudo dnf install -y eza || sudo dnf install -y exa || true
#install certs
echo "Installing CA certificates..."
sudo update-ca-trust
sudo mkdir -p /etc/ssl/certs
sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
#install 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 install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
echo "Installing kernel packages"
sudo dnf install -y \
dnf-plugins-core \
kernel-devel \
kernel-headers
echo "Installing nautilus extensions"
sudo dnf install -y \
nautilus-python \
nautilus-extensions \
nautilus-gtkhash
echo "Installing Codec"
# Media codecs (RPM-based apps)
sudo dnf group install -y multimedia
sudo dnf swap -y 'ffmpeg-free' 'ffmpeg' --allowerasing
sudo dnf upgrade -y @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
sudo dnf group install -y sound-and-video
#OpenH264 for Firefox
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1
sudo dnf install -y openh264 gstreamer1-plugin-openh264 mozilla-openh264
# NVIDIA drivers / VA-API tooling
if lspci | grep -Eiq 'nvidia.*(vga|3d|display)|(vga|3d|display).*nvidia'; then
echo "NVIDIA GPU detected. Installing NVIDIA drivers and VA-API tooling..."
sudo dnf install -y \
kernel-devel \
kernel-headers \
gcc \
make \
akmod-nvidia \
xorg-x11-drv-nvidia \
xorg-x11-drv-nvidia-cuda \
nvidia-settings \
nvidia-modprobe \
nvidia-persistenced \
xorg-x11-drv-nvidia-power
else
echo "No NVIDIA GPU detected. Skipping NVIDIA drivers."
fi
echo "Installing Brave"
curl -fsS https://dl.brave.com/install.sh | sh
# Install .NET using the official script
echo "Installing .NET SDK and Runtime..."
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel LTS
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel STS
grep -qxF 'export DOTNET_ROOT=$HOME/.dotnet' ~/.bashrc || echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
grep -qxF 'export PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools' ~/.bashrc || echo 'export PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools' >> ~/.bashrc
export DOTNET_ROOT="$HOME/.dotnet"
export PATH="$PATH:$HOME/.dotnet:$HOME/.dotnet/tools"
dotnet --version
dotnet tool install -g dotnet-ef
dotnet tool install -g dotnet-format
dotnet tool install -g coverlet.console
dotnet tool install -g dotnet-reportgenerator-globaltool
#install aspire
curl -sSL https://aspire.dev/install.sh | bash
aspire certs clean
aspire certs trust
# Install GNOME extensions by UUID
echo "Installing GNOME extensions..."
extensions=(
blur-my-shell@aunetx
dash-to-dock@micxgx.gmail.com
gtk4-ding@smedius.gitlab.com
clipboard-indicator@tudmotu.com
osd-volume-number@deminder
search-light@icedman.github.com
fullscreen-avoider@noobsai.github.com
gnome-fuzzy-app-search@gnome-shell-extensions.Czarlie.gitlab.com
gamebar-overlay@dekotale.github.io
)
for extension in "${extensions[@]}"
do
VERSION_TAG=$(curl -Lfs "https://extensions.gnome.org/extension-query/?search=${extension}" | jq '.extensions[0] | .shell_version_map | map(.pk) | max')
wget -O ${extension}.zip "https://extensions.gnome.org/download-extension/${extension}.shell-extension.zip?version_tag=$VERSION_TAG"
gnome-extensions install --force --quiet ${extension}.zip
if ! gnome-extensions list | grep --quiet ${extension}; then
busctl --user call org.gnome.Shell.Extensions /org/gnome/Shell/Extensions org.gnome.Shell.Extensions InstallRemoteExtension s ${extension}
fi
gnome-extensions enable ${extension}
rm ${extension}.zip
done
echo "Configuring Flathub (GPG-safe)..."
FLATHUB_KEY="/etc/pki/flatpak/flathub.gpg"
FLATHUB_REMOTE="flathub"
FLATHUB_REPO="https://dl.flathub.org/repo/flathub.flatpakrepo"
# Install flatpak if missing
if ! command -v flatpak &>/dev/null; then
sudo dnf install -y flatpak
fi
# Ensure GPG key exists
if [ ! -f "$FLATHUB_KEY" ]; then
echo "Installing Flathub GPG key..."
sudo mkdir -p /etc/pki/flatpak
sudo curl -fsSL https://dl.flathub.org/repo/flathub.gpg \
-o "$FLATHUB_KEY"
fi
# Add Flathub remote with GPG verification
if ! flatpak remotes --system --columns=name | grep -qx "$FLATHUB_REMOTE"; then
echo "Adding Flathub remote..."
sudo flatpak remote-add \
--system \
--if-not-exists \
--gpg-import="$FLATHUB_KEY" \
"$FLATHUB_REMOTE" "$FLATHUB_REPO"
else
echo "Flathub remote already exists."
fi
# Enforce GPG verification (just in case)
sudo flatpak remote-modify --system --gpg-verify=true "$FLATHUB_REMOTE"
echo "Installing Freedesktop Flatpak runtime and add-ons..."
# Install additional applications via Flatpak
echo "Installing additional applications..."
flatpak install -y flathub com.mattjakeman.ExtensionManager
flatpak install -y flathub org.telegram.desktop
flatpak install -y flathub org.qbittorrent.qBittorrent
flatpak install -y flathub com.vysp3r.ProtonPlus
flatpak install -y flathub com.heroicgameslauncher.hgl
flatpak install -y flathub net.davidotek.pupgui2
flatpak install -y flathub app.drey.Damask
flatpak install -y flathub org.gnome.FileRoller
flatpak install -y flathub com.github.tchx84.Flatseal
flatpak install flathub org.pipewire.Helvum
# Create necessary directories and templates
mkdir -p ~/.themes ~/.icons ~/.local/share/themes ~/.local/share/icons ~/Templates
touch ~/Templates/"Text File.txt"
# Completion message
echo "Installation complete. Please reboot the system or run 'source ~/.bashrc' to apply the settings."
# Completion
echo "The system will reboot in 1 minute to apply the settings..."
echo "Press Ctrl+C to cancel."
sleep 60
sudo shutdown -r now