-
Notifications
You must be signed in to change notification settings - Fork 0
/
installme.sh
executable file
·189 lines (142 loc) · 5.35 KB
/
installme.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
#!/bin/bash
if [ ! -d ~/.dotfiles ]; then
mkdir ~/.dotfiles
fi
cp -r . ~/.dotfiles
ZSRCDOT=~/.dotfiles/zsh/zshrc.cfg
# network-manager-openconnect-gnome if not for KDE - fix it
PACKAGES="yarn docker.io docker-compose packer
neovim silversearcher-ag gimp ansible
apt-transport-https curl whois
terminator zsh containerd ruby-full python3-venv
gnupg2 virtualbox keepassx python-setuptools
default-jre python3-pip python python-dev evince
jq dconf-editor tmux fonts-firacode fonts-powerline
tree atop nmap openconnect network-manager-openconnect
network-manager-openconnect-gnome gnome-terminal
vagrant linux-headers-generic"
sudo dpkg-reconfigure virtualbox-dkms
sudo dpkg-reconfigure virtualbox
echo "Remove nano"
sudo apt -y purge nano
echo "Install pip requirements"
sudo pip3 install -r python_packages.txt
sudo apt -y install --no-install-recommends software-properties-common
echo "Install fzf"
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
echo "Adding additional repositories"
sudo add-apt-repository -y universe
echo "Install apt-fast"
sudo add-apt-repository -y ppa:apt-fast/stable
sudo apt-get -y update
echo -e "1\n5\nno\n" | sudo apt-get -y install apt-fast
echo "Install Atom Editor"
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
sudo apt -y update
sudo apt -y install atom
echo "Installing packages"
sudo apt update && sudo apt -y install $PACKAGES
if [[ ! -n "$(command -v snap)" ]]; then
echo "Installing snapd on system"
sudo apt -y install snapd
fi
echo "Install telegram-desktop using snap"
sudo snap install telegram-desktop
echo "Install bitwarden with snap"
sudo snap install bitwarden
echo "Install zoom-client with snap"
sudo snap install zoom-client
echo "Install vscode with snap"
sudo snap install code --classic
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
ZSH=$(which zsh)
echo "Configuring tmux"
ln -sf ${HOME}/.dotfiles/tmux/tmux.conf ${HOME}/.tmux.conf
echo "Install ohmyzsh"
curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -o install.sh
echo -e "Y\n" | sh install.sh
rm -f install.sh
echo "Install asdf package manager"
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
cd ~/.asdf
git checkout "$(git describe --abbrev=0 --tags)"
. $HOME/.asdf/asdf.sh
echo "Install nodejs with asdf"
asdf plugin-add nodejs && \
asdf install nodejs latest && \
asdf global nodejs latest
echo "Install argocd with asdf"
asdf plugin-add argocd https://github.com/beardix/asdf-argocd.git && \
asdf install argocd latest && \
asdf global argocd latest
echo "Install helm with asdf"
asdf plugin-add helm https://github.com/Antiarchitect/asdf-helm.git && \
asdf install helm latest && \
asdf global helm latest
echo "Install kustomize with asdf"
asdf plugin-add kustomize https://github.com/Banno/asdf-kustomize.git && \
asdf install kustomize latest &&\
asdf global kustomize latest
# install from gcp
echo "Install awscli with asdf"
asdf install awscli latest && \
asdf global awscli latest
echo "Install kubectl with asdf"
asdf plugin-add kubectl https://github.com/asdf-community/asdf-kubectl.git && \
asdf install kubectl latest && \
asdf global kubectl latest
echo "Install kubectx with asdf"
asdf plugin add kubectx && \
asdf install kubectx 0.8.0 && \
asdf global kubectx 0.8.0
echo "Install minikube with asdf"
asdf plugin-add minikube https://github.com/alvarobp/asdf-minikube.git &&\
asdf install minikube latest &&\
asdf global minikube latest
echo "Install golang with asdf"
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git && \
asdf install golang latest && \
asdf global golang latest
echo "Install terraform with asdf"
asdf plugin-add terraform https://github.com/asdf-community/asdf-hashicorp.git && \
asdf install terraform latest && \
asdf global terraform latest
echo "Install sops with asdf"
asdf plugin-add sops https://github.com/feniix/asdf-sops.git && \
asdf install sops latest && \
asdf global sops latest
asdf plugin-add lua https://github.com/Stratus3D/asdf-lua.git && \
asdf install lua 5.1 && \
asdf global lua 5.1
asdf plugin-add rust https://github.com/code-lever/asdf-rust.git && \
asdf install rust latest && \
asdf global rust latest
asdf plugin-add julia https://github.com/rkyleg/asdf-julia.git && \
asdf install julia latest && \
asdf global julia latest
echo "Installing zsh plugins"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
if [ -f ~/.zshrc ]; then
echo "Configuring zshrc"
TMPDOFILE=$(grep zshrc.cfg ~/.zshrc)
if [ "$TMPDOFILE" ]; then
echo "zshrc.dotfiles will be adjusted"
sed "s%${TMPDOFILE}%source\ ${ZSRCDOT}%g" -i ~/.zshrc
else
echo "zshrc.dotfiles will be configured"
echo "source ${ZSRCDOT}" >> ~/.zshrc
fi
echo "Configuring zsh plugins"
sed '/^source\ \$ZSH\/oh-my-zsh.sh/i source\ \$HOME\/.dotfiles\/zsh\/plugins.sh' -i ~/.zshrc
fi
source ${ZSRCDOT}
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
echo "Configuring sysctl"
cat << EOF | sudo tee -a /etc/sysctl.conf
vm.overcommit_memory = 1
EOF
sudo sysctl -p
echo "Done."