-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·95 lines (74 loc) · 2.27 KB
/
bootstrap.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
#!/usr/bin/env bash
# Ask for the administrator password upfront
sudo -v
# To change computer name settings on a mac
# sudo scutil --set ComputerName computername
# sudo scutil --set HostName hostname
# sudo scutil --set LocalHostName localhostname
# setup brew
# brew automatically install and updated xcode
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# print commands
# do this after setup brew else brew will print the shell script
set -x
# setup macos defaults
./macos/defaults.sh
# submodules
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive --remote
git submodule foreach --recursive git reset --hard
# setup dotfiles
./dotbot.sh
# setup brew
brew bundle --file macos/Brewfile
# set homebrew's zsh as the default shell for everyone
sh -c "echo $(which zsh) >> /etc/shells"
chsh -s $(which zsh)
# setup asdf
## go
asdf plugin add golang
asdf install golang latest
asdf global golang $(asdf latest golang)
## rust
asdf plugin add rust
asdf install rust latest
asdf global rust $(asdf latest rust)
## nodejs
brew install coreutils gpg
asdf plugin add nodejs
/bin/bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
asdf install nodejs latest
asdf global nodejs $(asdf latest nodejs)
## python
brew install openssl readline xz zlib
asdf plugin add python
asdf install python latest:2
asdf install python latest:3
asdf global python $(asdf latest python 3) $(asdf latest python 2)
## direnv
asdf plugin add direnv
asdf install direnv latest
asdf global direnv $(asdf latest direnv)
asdf direnv setup --shell zsh --version $(asdf latest direnv)
# neovim
## nvr
pip3 install --upgrade neovim-remote
## python provider
pip2 install --upgrade pynvim
pip3 install --upgrade pynvim
## nodejs provider
npm install -g neovim@latest
# reshim asdf just in case
asdf reshim
# setup tmux
~/.tmux/plugins/tpm/bin/clean_plugins
~/.tmux/plugins/tpm/bin/install_plugins
~/.tmux/plugins/tpm/bin/update_plugins all
pushd ~/.tmux/plugins/tmux-thumbs
./tmux-thumbs-install.sh
popd
# setup fzf
~/.fzf/install --key-bindings --completion --no-update-rc --no-bash --no-fish
## install plugins on neovim
nvim --headless "+Lazy! restore" +qa
nvim -c 'autocmd User LazySync Copilot auth' -c "autocmd User VeryLazy Lazy sync"