-
Notifications
You must be signed in to change notification settings - Fork 27
/
setup.sh
executable file
·216 lines (161 loc) · 7.15 KB
/
setup.sh
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
#!/usr/bin/env bash
set -ex
# Ensure repositories are enabled
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo add-apt-repository restricted
# Add dell drivers for focal fossa XPS 13
sudo sh -c 'cat > /etc/apt/sources.list.d/focal-dell.list << EOF
deb http://dell.archive.canonical.com/updates/ focal-dell public
# deb-src http://dell.archive.canonical.com/updates/ focal-dell public
deb http://dell.archive.canonical.com/updates/ focal-oem public
# deb-src http://dell.archive.canonical.com/updates/ focal-oem public
deb http://dell.archive.canonical.com/updates/ focal-somerville public
# deb-src http://dell.archive.canonical.com/updates/ focal-somerville public
deb http://dell.archive.canonical.com/updates/ focal-somerville-melisa public
# deb-src http://dell.archive.canonical.com/updates focal-somerville-melisa public
EOF'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F9FDA6BED73CDC22
sudo apt update -qq
# Install general utilities
sudo apt install git htop lame net-tools flatpak audacity \
openssh-server sshfs simplescreenrecorder nano \
vlc gthumb gnome-tweaks ubuntu-restricted-extras thunderbird \
ffmpeg ufw \
gnome-tweak-tool spell synaptic -y -qq
# Install drivers
sudo apt install oem-somerville-melisa-meta libfprint-2-tod1-goodix oem-somerville-meta tlp-config -y
# Install fusuma for handling gestures
sudo gpasswd -a $USER input
sudo apt install libinput-tools xdotool ruby -y -qq
sudo gem install --silent fusuma
# Install Howdy for facial recognition
while true; do
read -p "Facial recognition with Howdy (y/n)?" choice
case "$choice" in
y|Y )
echo "Installing Howdy"
sudo add-apt-repository ppa:boltgolt/howdy -y > /dev/null 2>&1
sudo apt update -qq
sudo apt install howdy -y; break;;
n|N )
echo "Skipping Install of Howdy"; break;;
* ) echo "invalid";;
esac
done
# Remove packages:
sudo apt remove rhythmbox -y -q
# Add Flatpak support:
sudo apt install gnome-software-plugin-flatpak -y
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Install Icon Theme
[[ -d /tmp/tela-icon-theme ]] && rm -rf /tmp/tela-icon-theme
git clone https://github.com/vinceliuice/Tela-icon-theme.git /tmp/tela-icon-theme > /dev/null 2>&1
/tmp/tela-icon-theme/install.sh -a
gsettings set org.gnome.desktop.interface icon-theme 'Tela-grey-dark'
# Add Plata-theme
sudo add-apt-repository ppa:tista/plata-theme -y > /dev/null 2>&1
sudo apt update -qq && sudo apt install plata-theme -y
gsettings set org.gnome.desktop.interface gtk-theme "Plata-Noir"
gsettings set org.gnome.desktop.wm.preferences theme "Plata-Noir"
# Enable Shell Theme
sudo apt install gnome-shell-extensions -y
gnome-extensions enable [email protected]
gsettings set org.gnome.shell.extensions.user-theme name "Plata-Noir"
# Install fonts
sudo apt install fonts-firacode fonts-open-sans -y -qq
gsettings set org.gnome.desktop.interface font-name 'Open Sans 12'
gsettings set org.gnome.desktop.interface monospace-font-name 'Fira Code 13'
# Setup Development tools
## Update python essentials
sudo apt install python3 python3-pip python-is-python3 -y
sudo python3 -m pip install -U pip setuptools wheel
python3 -m pip install --user black
## Add build essentials
sudo apt install build-essential -y
## Add Java JDK LTS
sudo apt install openjdk-11-jdk -y
sudo apt install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y -q
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/packages.microsoft.gpg
sudo install -o root -g root -m 644 /tmp/packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" > /dev/null 2>&1
sudo apt update -qq && sudo apt install docker-ce docker-ce-cli docker-compose containerd.io code -y
## Post installation for docker
sudo groupadd -f docker
sudo usermod -aG docker $USER
## Post installation for code (sensible defaults)
code --install-extension ms-python.python
code --install-extension visualstudioexptteam.vscodeintellicode
code --install-extension eamodio.gitlens
code --install-extension ms-azuretools.vscode-docker
## Install Go
wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz -O /tmp/go1.17.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf /tmp/go1.17.2.linux-amd64.tar.gz
if ! grep -qF "export PATH=\$PATH:/usr/local/go/bin" /etc/profile; then
sudo sh -c 'echo "export PATH=\$PATH:/usr/local/go/bin" >> /etc/profile'
fi
## Install dotnet-core sdk + runtime
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y dotnet-sdk-5.0
sudo apt-get install -y aspnetcore-runtime-5.0
sudo flatpak install postman -y
## Node.JS + Yarn Install
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "Installing Node 18 JS LTS"
sudo apt-get update
sudo apt-get install nodejs -y
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update -qq && sudo apt-get install -y yarn
# Setup Android Studio for Mobile Development
while true; do
read -p "Mobile development (Android) (y/n)?" choice
case "$choice" in
y|Y )
sudo dpkg --add-architecture i386 && sudo apt update -qq
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2022.3.1.19/android-studio-2022.3.1.19-linux.tar.gz -O /tmp/android-studio-2022.3.1.19-linux.tar.gz
sudo tar -xzf /tmp/android-studio-2022.3.1.19-linux.tar.gz -C /opt
sudo sh -c 'cat > /usr/share/applications/jetbrains-studio.desktop << EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Icon=/opt/android-studio/bin/studio.svg
Exec="/opt/android-studio/bin/studio.sh" nosplash %f
Comment=The Drive to Develop
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-studio
EOF'
sudo chmod 644 /usr/share/applications/jetbrains-studio.desktop; break;;
n|N )
echo "Skipping Install of Android SDKs"; break;;
* ) echo "invalid";;
esac
done
## Chat
sudo flatpak install app/com.discordapp.Discord/x86_64/stable -y
## Multimedia
sudo apt install -y gimp
sudo flatpak install spotify -y
# Gotta reboot now:
sudo apt update -qq && sudo apt upgrade -y && sudo apt autoremove -y
echo $'\n'$"Ready for REBOOT"