-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirst_setup.sh
executable file
·100 lines (83 loc) · 3.66 KB
/
first_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
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Initial update of system
sudo apt update
sudo apt upgrade -y
# install libsecret
sudo apt install -y libsecret-1-0 libsecret-1-dev
(cd /usr/share/doc/git/contrib/credential/libsecret && sudo make)
# set git email
git config --global user.email "[email protected]"
git config --global user.name "jameswinegar"
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
# move dotfiles
cp dotfiles/.bash_aliases ${HOME}
# install fonts
sudo apt install -y cabextract font-manager
sudo wget -O /usr/share/fonts/Inconsolata-Regular.ttf https://github.com/google/fonts/raw/master/ofl/inconsolata/Inconsolata-Regular.ttf
# enable locate
sudo ionice -c3 updatedb
# install sqlite
sudo apt install -y sqlite
# install java and maven
sudo apt install -y openjdk-8-jdk maven
#install python and pipenv
sudo apt install python-pip python3-pip
pip3 install --user pipenv
echo 'export PATH="${HOME}/.local/bin:$PATH"' >> ${HOME}/.bashrc
source ${HOME}/.bashrc
# install snap and install what can be done through snaps
sudo apt install -y snapd
sudo snap install slack --classic
sudo snap install pycharm-professional --classic
sudo snap install discord
sudo snap install spotify
# install cuda
sudo apt install -y nvidia-cuda-toolkit gcc-6
# install google chrome
wget -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install /tmp/google-chrome.deb -y
# install docker
sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt update
sudo apt install docker-ce
sudo groupadd docker
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/$(get_latest_release "docker/compose")/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# install gcloud and kubectl
sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt update
sudo apt install -y google-cloud-sdk
sudo apt install -y kubectl
# add systems monitor to task bar
sudo apt install -y gnome-shell-extension gir1.2-gtop-2.0 gir1.2-networkmanager-1.0 gir1.2-clutter-1.0
sudo wget -O /usr/local/bin/gnomeshell-extension-manage "https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/ubuntugnome/gnomeshell-extension-manage"
sudo chmod +x /usr/local/bin/gnomeshell-extension-manage
gnomeshell-extension-manage --install --extension-id 120
# add Hashicorp service updater. TODO: Only update when needed, currently downloads on each init of systemd
sudo ./publisher.sh
# Remind me to do stuff
printf '\n\n\n\n\n\n'
echo "DO THE FOLLOWING:"
echo "1. Add slack channels"
echo "2. Add google accounts"
echo "3. Initalize gcloud cli"
echo "4. Setup PyCharm"
echo "5. Login to spotify & discord"