-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_once_after_install_packages.sh.tmpl
206 lines (170 loc) · 4.64 KB
/
run_once_after_install_packages.sh.tmpl
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#!/usr/bin/env bash
set -x
set -e
{{ if .mac }}
if [[ ! $(which brew) ]]; then
echo "installing homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
brew bundle --no-lock --file=/dev/stdin <<EOF
brew "fzf"
brew "bat"
brew "pstree"
brew "pv"
brew "the_silver_searcher"
brew "rg"
brew "tree"
brew "direnv"
brew "antigen" # zsh plugins
brew "zsh-syntax-highlighting"
tap "buo/cask-upgrade"
brew "git"
brew "difftastic"
brew "diffutils" # https://github.com/golangci/golangci-lint/issues/3087
brew "jq"
brew "watch"
brew "fswatch"
brew "entr"
brew "parallel"
brew "prettyping"
brew "mtr"
brew "rename" # conflicts with linux-util on linux
brew "chezmoi"
cask "1password-cli"
cask "arq"
brew "zsh"
brew "gh"
brew "s3cmd"
brew "kcat"
brew "go"
brew "ruby"
brew "rbenv"
brew "node"
brew "nodenv"
brew "flow" # for javascript
brew "shellcheck"
brew "flyctl"
cask "kap" # screen capturing
# cask "wireshark"
# for other stuff
tap "homebrew/cask-fonts"
cask "font-fira-code"
cask "font-ia-writer-duo"
cask "font-ia-writer-quattro"
cask "font-iosevka"
# cask "font-iosevka-slab"
cask "font-alegreya"
cask "font-alegreya-sans"
cask "font-alegreya-sans"
brew "svn" # seriously? lol
cask "font-merriweather"
cask "docker"
cask "qlmarkdown" # markdown quicklook
brew "lunchy"
# applications
brew "mas"
cask "raycast"
cask "hammerspoon"
cask "iterm2"
cask "1password"
cask "visual-studio-code"
cask "bartender"
cask "obsidian"
cask "istat-menus"
cask "slack"
cask "discord"
cask "google-chrome"
cask "marked"
# for flashing firmware for ergodox
# tap "PX4/homebrew-px4"
# brew "dfu-util"
# brew "gcc-arm-none-eabi-54"
# brew "python3"
# brew "cmake"
# for AVR development:
# cask "crosspack-avr"
# tap "osx-cross/avr"
# brew "avr-libc" # doesn't exist anymore?
# brew "avrdude"
# brew "kubectl"
# brew "kubectx"
# brew "stern" # for tailing logs
EOF
# app store apps
mas install 1451552749 # Open In Webmail
mas install 1351639930 # Gifski
mas install 1528890965 # TextSniper
mas install 1491071483 # Tot
mas install 1547121417 # HomeControl
mas install 635758264 # Calca
mas install 1544668450 # Simplify for Gmail
mas install 1569813296 # 1Password for Safari
mas install 451640037 # Classic Color Meter
mas install 904280696 # Things
mas install 1432731683 # Adblock Plus
mas install 411643860 # DaisyDisk
mas install 290986013 # Deliveries
mas install 6444602274 # Ivory
mas install 497799835 # Xcode
mas install 1459809092 # Accelerate
mas install 1090488118 # Gemini 2
mas install 775737590 # iA Writer
# mas install 1081413713 # GIF Brewery 3
mas install 1502839586 # Hand Mirror
mas install 432027450 # RadarScope
mas install 1666139593 # Homecoming for Mastodon
mas install 1640236961 # Save to Reader
mas install 1421915518 # PiPer
mas install 419330170 # Moom
mas install 1475387142 # Tailscale
/opt/homebrew/opt/fzf/install --no-update-rc --key-bindings --completion --xdg
eval "$(rbenv init - zsh)"
# set ruby to the latest version
brew rbenv-sync -v
latest=$(rbenv install -l 2>/dev/null | grep -E '^\d' | grep -v '-' | tail -1)
if rbenv versions | grep -q $latest; then
echo "ruby $latest already set as default, skipping"
else
echo "setting latest ruby $latest as global default"
rbenv global "$latest"
fi
# for local scripts
gem install bubs --conservative
gem install colorize --conservative
# for vscode
gem install solargraph --conservative
gem install rubocop --conservative
gem install ruby-debug-ide --conservative
gh auth status || gh auth login
gh md >/dev/null 2>&1 || gh extension install zerowidth/gh-md
[[ -L ~/.ssh ]] || ln -s {{ .chezmoi.homeDir }}/Documents/sync/ssh ~/.ssh
{{ end }}
{{ if .linux }}
[[ -d ~/.local/share/fzf ]] || git clone --depth 1 https://github.com/junegunn/fzf.git ~/.local/share/fzf
~/.local/share/fzf/install --no-update-rc --key-bindings --completion --xdg
{{ if .shared }}
if ! [[ -f ~/.local/bin/kcat ]]; then
git clone https://github.com/edenhill/kcat ~/.local/share/kcat
cd ~/.local/share/kcat && ./bootstrap.sh
cp ~/.local/share/kcat/kcat ~/.local/bin/kcat
fi
if [ -d ~/.vim/plugins ]; then
echo "vim plugins already installed, skipping"
else
vim --not-a-term +PlugInstall +qa
fi
{{ else }}
if ! type bat >/dev/null; then
curl -s -L https://github.com/sharkdp/bat/releases/download/v0.20.0/bat_0.20.0_amd64.deb -o /tmp/bat.deb && \
sudo dpkg -i /tmp/bat.deb
fi
sudo apt-get install -y \
zsh zsh-syntax-highlighting \
silversearcher-ag \
ripgrep
{{ end -}}
if [[ -n "$(grep $(whoami) /etc/passwd)" ]] && ! grep -q "$(whoami).*/bin/zsh" /etc/passwd; then
sudo chsh -s /bin/zsh $(whoami)
fi
{{ end }}