-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathubuntu_install_tools.sh
More file actions
128 lines (105 loc) · 4.69 KB
/
ubuntu_install_tools.sh
File metadata and controls
128 lines (105 loc) · 4.69 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
#!/usr/bin/env bash
##################### Install tools for Ubuntu #####################
# Update and install packages
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget -y
# Download dotfiles
git clone https://github.com/shitcoding/dotfiles ~/.dotfiles
# Install useful tools: alacritty, zsh, oh-my-zsh, p10k prompt, tmux, LunarVim, etc.
#
# Install alacritty and copy config from dotfiles
sudo apt install alacritty -y
mkdir -p ~/.config/alacritty
cp ~/.dotfiles/alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml
# Download and install Nerd Fonts
mkdir -p /tmp/nerd-fonts
cd /tmp/nerd-fonts
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Hack.zip
unzip Meslo.zip
unzip Hack.zip
mkdir -p ~/.local/share/fonts
mv ./*.ttf ~/.local/share/fonts
fc-cache -fv
rm -rf /tmp/nerd-fonts
# Install zsh, oh-my-zsh, plugins, set up config ###########
# Set up zsh and other tools
sudo apt install zsh fzf -y
sudo chsh -s $(which zsh) $USER
# Set up oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Install oh-my-zsh plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/joshskidmore/zsh-fzf-history-search ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-fzf-history-search
# Fix permissions issues for downloaded plugins (in case there are issues)
chown -R $(whoami):$(whoami) $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
chown -R $(whoami):$(whoami) $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
chown -R $(whoami):$(whoami) $HOME/.oh-my-zsh/custom/plugins/zsh-fzf-history-search
# Install powerlevel10k prompt
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Copy zsh dotfiles, aliases, env vars
cp ~/.dotfiles/zsh/.zshrc ~/.zshrc
cp ~/.dotfiles/powerlevel10k/.p10k.zsh ~/.p10k.zsh
cp ~/.dotfiles/zsh/oh-my-zsh/custom/* $ZSH_CUSTOM
############ Install tmux and plugins ###########################
sudo apt install tmux -y
# Install tpm plugin manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Copy tmux config from downloaded dotfiles
cp ~/.dotfiles/tmux/.tmux.conf ~/.tmux.conf
########## Install Lunarvim, set up config and plugins ###########
# Install latest version of Neovim
sudo add-apt-repository ppa:neovim-ppa/unstable -y
sudo apt update
sudo apt install neovim -y
# Install LunarVim dependencies
# install rust
# TODO: Remove prompt during rust installation
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install make unzip python3-pip python3 python3-venv -y
#Install nvm, nodejs, npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.zshrc > /dev/null
nvm install node
nvm install-latest-npm
# Install LunarVim + its nodejs/python/rust dependencies
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh) << EOF
y
y
y
EOF
# Add path to lvim executable to system $PATH
#echo "export PATH=/home/ubuntu/.local/bin:$PATH" >> $ZSH_CUSTOM/env.zsh
echo "export PATH=$HOME/.local/bin:$PATH" >> $ZSH_CUSTOM/env.zsh
# Set lvim config from dotfiles
cp $HOME/.dotfiles/lvim/config.lua $HOME/.config/lvim/config.lua
mkdir -p $HOME/.config/lvim/after/ftplugin/
cp $HOME/.dotfiles/lvim/htmldjango.vim $HOME/.config/lvim/after/ftplugin/htmldjango.vim
###### Various tools ############################
# logo-ls
wget -P /tmp https://github.com/Yash-Handa/logo-ls/releases/latest/download/logo-ls_amd64.deb
sudo dpkg -i /tmp/logo-ls_amd64.deb
# Install Docker
sudo apt install \
ca-certificates \
curl \
gnupg \
lsb-release -y
# Add Docker’s official GPG key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# Set up the repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update the apt package index
sudo apt update
# Install Docker Engine, containerd, and Docker Compose
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-compose -y
# Create the `docker` group
sudo groupadd -f docker
# Add your user to the docker group
sudo usermod -aG docker $USER
# Activate the changes to groups
newgrp docker