-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux-setup.sh
executable file
·151 lines (110 loc) · 4.07 KB
/
linux-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
#!/usr/bin/env bash
set -e
echo "========================="
echo "== Installing Packages =="
echo "========================="
sudo pacman -S vim neovim base-devel git cmake zsh
sudo pacman -S wezterm wezterm-shell-integration wezterm-terminfo
sudo pacman -S docker docker-compose docker-scan
sudo pacman -S otf-cascadia-code ttf-cascadia-code woff2-cascadia-code
pamac build asdf-vm
. /opt/asdf-vm/asdf.sh
asdf plugin add golang
asdf install golang latest
asdf global golang latest
asdf plugin add nodejs
asdf install nodejs latest
asdf global nodejs latest
asdf plugin add rust
asdf install rust latest
asdf global rust latest
asdf plugin add kubectl
asdf install kubectl latest
asdf global kubectl latest
asdf plugin add kind
asdf install kind latest
asdf global kind latest
asdf plugin add k9s
asdf install k9s latest
asdf global k9s latest
asdf plugin add mage
asdf install mage latest
asdf global mage latest
asdf plugin add zellij
asdf install zellij latest
asdf global zellij latest
echo "========================"
echo "== Making Directories =="
echo "========================"
mkdir -p $HOME/.ssh
mkdir -p $HOME/.local/bin
mkdir -p $HOME/.local/apps
mkdir -p $HOME/.config/nvim
mkdir -p $HOME/.config/systemd/user
echo "=========================="
echo "== Symlinking Dot Files =="
echo "=========================="
ln -s $HOME/dev/dotfiles $HOME/.mydotfiles
echo "===================="
echo "== Setting up git =="
echo "===================="
git config --global init.defaultBranch main
git config --global user.email "[email protected]"
git config --global user.name "Bryan Vestey"
echo "===================="
echo "== Setting up ssh =="
echo "===================="
ln -s $HOME/.mydotfiles/ssh/config $HOME/.ssh/config
ln -s $HOME/.mydotfiles/ssh/ssh-agent.service $HOME/.config/systemd/user/ssh-agent.service
systemctl --user enable ssh-agent
systemctl --user start ssh-agent
echo "===================="
echo "== Setting up zsh =="
echo "===================="
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mv $HOME/.zshrc $HOME/.zshrc.pre-personal
echo << "EOF" > .zshrc
# Path to my oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Path to my .zshrc file
source $HOME/.mydotfiles/zsh/zshrc-linux.zsh
EOF
echo "========================"
echo "== Setting up wezterm =="
echo "========================"
ln -s $HOME/.mydotfiles/wezterm/wezterm.lua $HOME/.wezterm.lua
echo "====================="
echo "== Setting up tmux =="
echo "====================="
ln -s $HOME/.mydotfiles/tmux/tmux.conf $HOME/.tmux.conf
echo "======================="
echo "== Setting up Docker =="
echo "======================="
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker $USER
echo "======================="
echo "== Setting up Zellij =="
echo "======================="
ln -s $HOME/.mydotfiles/zellij $HOME/.config/zellij
echo "======================="
echo "== Setting up NeoVIM =="
echo "======================="
ln -s $HOME/.mydotfiles/neovim/init.vim $HOME/.config/nvim/init.vim
# Install vim-plug as a plugin manager
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'
# Install language servers
npm install -g graphql-language-service-cli sql-language-server svelte-language-server typescript typescript-language-server vim-language-server yaml-language-server
echo "======================="
echo "== Setting up VSCode =="
echo "======================="
curl -L "https://code.visualstudio.com/sha/download?build=stable&os=linux-x64" --output - | tar -xz -C $HOME/.local/apps
ln -s $HOME/.local/apps/VSCode-linux-x64/bin/code $HOME/.local/bin/code
echo "==========================="
echo "== Post run instructions =="
echo "==========================="
echo 'Open nvim and run ":PlugInstall" to install plugins.'
echo 'Open nvim and run ":TSInstall all" to install treesplitter items.'
echo 'Open nvim and run ":helptags ALL" to update all the help tags'
echo 'Log out and back in to have permissions to interact with docker'