forked from argrubbs/silverblue-ublue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ublue-firstboot
executable file
·161 lines (139 loc) · 4.61 KB
/
ublue-firstboot
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
#!/bin/sh
if test -e "$HOME"/.config/ublue/firstboot-done; then
echo "Already ran"
exit 0
fi
(
echo "# Waiting for Internet connection"
until /usr/bin/ping -q -c 1 flathub.org; do sleep 1; done
echo "00"
echo "# Enabling Flathub Repository"
/usr/bin/flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
if [ "$?" != 0 ] ; then
zenity --error \
--text="Adding Flathub Repo Failed"
exit 1
fi
echo "5"
echo "# Installing Discord"
/usr/bin/flatpak install --user --noninteractive flathub com.discordapp.Discord
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Discord failed"
exit 1
fi
echo "10"
#echo "# Installing oh-my-bash"
#bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"
#if [ "$?" != 0 ] ; then
# zenity --error \
# --text="Installing oh-my-bash failed"
# exit 1
#fi
#echo "15"
echo "# Installing Chromium"
/usr/bin/flatpak install --user --noninteractive flathub org.chromium.Chromium
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Chromium failed"
exit 1
fi
echo "20"
echo "# Installing Firefox"
/usr/bin/flatpak install --user --noninteractive flathub org.mozilla.firefox
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Firefox Failed"
exit 1
fi
echo "30"
echo "# Installing Spotify"
/usr/bin/flatpak install --user --noninteractive com.spotify.Client
git clone https://github.com/abba23/spotify-adblock.git
cd spotify-adblock
make -j`nproc`
mkdir -p ~/.spotify-adblock && cp target/release/libspotifyadblock.so ~/.spotify-adblock/spotify-adblock.so
mkdir -p ~/.config/spotify-adblock && cp config.toml ~/.config/spotify-adblock
flatpak override --user --filesystem="~/.spotify-adblock/spotify-adblock.so" --filesystem="~/.config/spotify-adblock/config.toml" com.spotify.Client
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Spotify Failed"
exit 1
fi
echo "40"
#echo "# Installing Extension Manager"
#/usr/bin/flatpak install --user --noninteractive flathub com.mattjakeman.ExtensionManager
#if [ "$?" != 0 ] ; then
# zenity --error \
# --text="Installing Extension Manager Failed"
# exit 1
#fi
#echo "50"
echo "# Installing LibreOffice"
/usr/bin/flatpak install --user --noninteractive flathub org.libreoffice.LibreOffice
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing LibreOffice Failed"
exit 1
fi
echo "70"
#echo "# Installing blur my shell"
#wget https://github.com/aunetx/blur-my-shell/releases/download/v62/[email protected]
#gnome-extensions install [email protected]
#echo "73"
#echo "# Installing bluetooth quick connect"
#wget https://github.com/Extensions-Valhalla/gnome-bluetooth-quick-connect/releases/download/v49/[email protected]
#gnome-extensions install [email protected]
#echo "77"
echo "# Installing DejaDup Backup"
/usr/bin/flatpak install --user --noninteractive flathub org.gnome.DejaDup
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing DejaDup Failed"
exit 1
fi
echo "80"
#echo "# Installing Font Downloader"
#/usr/bin/flatpak install --user --noninteractive flathub org.gustavoperedo.FontDownloader
#if [ "$?" != 0 ] ; then
# zenity --error \
# --text="Installing FontDownloader Failed"
# exit 1
#fi
#echo "85"
echo "# Installing Flatseal"
/usr/bin/flatpak install --user --noninteractive flathub com.github.tchx84.Flatseal
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Flatseal Failed"
exit 1
fi
echo "85"
echo "# Installing VLC"
/usr/bin/flatpak install --user --noninteractive flathub org.videolan.VLC
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing VLC Failed"
exit 1
fi
echo "90"
echo "# Importing secure boot keys"
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
if [ "$?" != 0 ] ; then
zenity --error \
--text="Importing secure boot keys Failed"
exit 1
fi
echo "100"
echo "# Reticulating Final Splines"
mkdir -p "$HOME"/.config/ublue/
touch "$HOME"/.config/ublue/firstboot-done
cp -n /etc/justfile "$HOME"/.justfile
) |
zenity --progress --title="Noah's Fedora Firstboot" --percentage=0 --auto-close --no-cancel --width=300
if [ "$?" != 0 ] ; then
zenity --error \
--text="Firstboot Configuration Error"
fi