-
Notifications
You must be signed in to change notification settings - Fork 0
/
machine_setup.yaml
365 lines (339 loc) · 12.5 KB
/
machine_setup.yaml
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
---
default_shell: "zsh"
tasks:
zsh:
commands:
- run:
shell: "bash"
commands:
- "sudo apt-get update"
- "sudo apt-get install -y zsh"
- 'sudo chsh -s "$(command -v zsh)" "${USER}"'
- run:
env:
ZSH: ""
TMP_INSTALL_PATH: "/tmp/install-omz.sh"
commands:
- "sudo rm -r ~/.oh-my-zsh"
- "wget -O $TMP_INSTALL_PATH https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh"
- "chmod u+x $TMP_INSTALL_PATH"
- "$TMP_INSTALL_PATH"
- "rm $TMP_INSTALL_PATH"
zsh_extras:
parallel: true
commands:
- clone:
url: "https://github.com/romkatv/powerlevel10k.git"
target: "~/.oh-my-zsh/custom/themes/powerlevel10k"
- clone:
url: "https://github.com/zsh-users/zsh-syntax-highlighting.git"
target: "~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
- clone:
url: "https://github.com/zsh-users/zsh-autosuggestions"
target: "~/.oh-my-zsh/custom/plugins/zsh-autosuggestions"
- clone:
url: "https://github.com/zsh-users/zsh-completions"
target: "~/.oh-my-zsh/custom/plugins/zsh-completions"
wsl_config:
commands:
- symlink:
src: "./etc/wsl.conf"
target: "/etc/wsl.conf"
windows_terminal:
commands:
- run:
shell: "bash"
env:
SETTINGS_PATH: "/c/Users/Timo/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState/settings.json"
commands:
- "rm -f $SETTINGS_PATH"
# symlink doesn't work after the settings were changed via UI
# Apparently, the file gets regenerated instead of changed 🤔
- copy:
src: "./terminal"
target: "/c/Users/Timo/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState"
ssh:
commands:
- copy:
src: "/c/Users/Timo/OneDrive/Dokumente/_DEV/.ssh"
target: "~/.ssh"
- run:
commands:
install:
- "chmod 700 ~/.ssh"
- "chmod 600 ~/.ssh/id_rsa"
- "chmod 644 ~/.ssh/id_rsa.pub"
tools:
commands:
- run:
commands:
- "sudo apt-get update && sudo apt-get upgrade -y"
- "sudo apt-get install -y tmux fuse ripgrep fd-find unzip apt-transport-https lsb-release ca-certificates wget software-properties-common keychain xclip libssl-dev cmake pkg-config build-essential mysql-client ninja-build libwebkit2gtk-4.0-37 exa fswatch luarocks"
- "curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash"
tpm:
commands:
- clone:
url: "https://github.com/tmux-plugins/tpm"
target: "~/.tmux/plugins/tpm"
dotfiles:
commands:
- clone:
url: "git@github.com:timopruesse/.dotfiles.git"
target: "."
- symlink:
force: true
src: "./home"
target: "~"
lazygit_linux:
os: ["linux"]
commands:
- run:
commands:
install:
- "$HOME/install_lazygit.sh"
lazygit_linux:
os: ["macos"]
commands:
- run:
commands:
install:
- "brew install jesseduffield/lazygit/lazygit"
- "brew install lazygit"
neovim:
commands:
- run:
commands:
install:
- "sudo add-apt-repository -y ppa:neovim-ppa/unstable"
- "sudo apt-get update"
- "sudo apt-get install -y neovim python3-neovim"
- "sudo luarocks install jsregexp"
update:
- "sudo apt-get upgrade neovim"
uninstall:
- "sudo apt remove -y neovim python3-neovim"
rust:
commands:
- run:
commands:
install:
- "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y"
- "source $HOME/.cargo/env"
- "rustup toolchain install nightly --allow-downgrade --profile minimal --component clippy"
- "rustup component add rustfmt --toolchain nightly"
update:
- "rustup update"
- run:
commands:
- "mkdir -p ~/.local/bin"
- "curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - > ~/.local/bin/rust-analyzer"
- "chmod +x ~/.local/bin/rust-analyzer"
- run:
commands:
- "cargo install cargo-tarpaulin"
- "cargo install tree-sitter-cli"
brew:
commands:
- run:
env:
TMP_INSTALL_PATH: "/tmp/install-brew.sh"
commands:
- "wget -O $TMP_INSTALL_PATH https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh"
- "chmod u+x $TMP_INSTALL_PATH"
- "$TMP_INSTALL_PATH"
- "rm $TMP_INSTALL_PATH"
- 'rm -rf "/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core"'
- "brew tap homebrew/core"
- 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"'
bun:
commands:
- run:
commands:
install: "curl -fsSL https://bun.sh/install | bash"
update: "bun upgrade --canary"
node:
commands:
- run:
env:
NVM_DIR: "~/.nvm"
commands:
install:
- "mkdir -p $NVM_DIR"
- "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash"
- "source ~/.zshrc"
- "nvm alias default $(node --version)"
update:
- "OLD_NODE_VERSION=$(node --version)"
- "nvm install node --reinstall-packages-from=node --default"
- "npm upgrade -g"
- "nvm alias default $(node --version)"
- "nvm uninstall $OLD_NODE_VERSION"
uninstall:
- "nvm uninstall $(node --version)"
- "rm -rf $NVM_DIR"
php-lsp:
commands:
- copy:
src: "/c/Users/Timo/OneDrive/Dokumente/_DEV/intelephense.txt"
target: "~/intelephense/licence.txt"
- run:
commands:
install: "npm install -g blade-formatter"
update: "npm upgrade -g blade-formatter"
uninstall: "npm uninstall -g blade-formatter"
nvim-npm:
commands:
- run:
env:
PACKAGES_STR: "neovim"
commands:
install: "npm install -g $(echo $PACKAGES_STR)"
update: "npm upgrade -g $(echo $PACKAGES_STR)"
uninstall: "npm uninstall -g $(echo $PACKAGES_STR)"
python:
commands:
- run:
commands:
install:
- "sudo apt-get install -y pipx python3-venv python3-pip"
- "python3 -m pipx ensurepath"
- "pip install pynvim pip-review"
update:
- "pip-review --auto"
aws:
commands:
- run:
commands:
install:
- 'curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip"'
- "unzip /tmp/awscliv2.zip -d /tmp/"
- "sudo /tmp/aws/install"
- "rm /tmp/awscliv2.zip"
- "rm -rf /tmp/aws"
- "pipx install aws-sso-util"
update:
- 'curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip"'
- "unzip /tmp/awscliv2.zip -d /tmp/"
- "sudo /tmp/aws/install --update"
- "rm /tmp/awscliv2.zip"
- "rm -rf /tmp/aws"
php:
commands:
- run:
commands:
install:
- "sudo add-apt-repository ppa:ondrej/php -y"
- "sudo apt-get update && sudo apt-get upgrade -y"
- "sudo apt-get install php8.3-cli -y"
- "sudo apt-get install -y php8.3-bz2 php8.3-curl php8.3-intl php8.3-xml php8.3-mbstring php8.3-zip"
uninstall:
- "sudo add-apt-repository --remove ppa:ondrej/php"
- "sudo apt-get remove -y php8.3-bz2 php8.3-curl php8.3-intl php8.3-xml php8.3-mbstring php8.3-zip"
- "sudo apt-get remove php8.3-cli -y"
- run:
env:
TMP_INSTALL_PATH: "/tmp/composer-setup.php"
commands:
install:
- "curl -sS https://getcomposer.org/installer -o $TMP_INSTALL_PATH"
- "sudo php $TMP_INSTALL_PATH --install-dir=/usr/local/bin --filename=composer"
- "rm -rf $TMP_INSTALL_PATH"
update:
- "sudo composer self-update"
- run:
commands:
install:
- "composer global require phpmd/phpmd"
- "composer global require squizlabs/php_codesniffer"
- "composer global require phpstan/phpstan"
- "composer global require friendsofphp/php-cs-fixer"
update:
- "composer global require phpmd/phpmd"
- "composer global require squizlabs/php_codesniffer"
- "composer global require phpstan/phpstan"
- "composer global require friendsofphp/php-cs-fixer"
go:
commands:
- run:
commands:
install:
- "sudo apt-get install -y golang"
update:
- "sudo apt-get upgrade -y golang"
uninstall:
- "sudo apt-get remove -y golang"
clang:
commands:
- run:
commands:
install:
- "sudo apt-get install -y ninja-build clang"
update:
- "sudo apt-get upgrade -y ninja-build clang"
uninstall:
- "sudo apt-get remove -y ninja-build clang"
dart:
commands:
- run:
commands:
install:
- "wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg"
- "echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list"
- "sudo apt-get update"
- "sudo apt-get install dart"
flutter:
commands:
- run:
env:
TMP_INSTALL_PATH: "/tmp/cmdline.zip"
commands:
install:
- "sudo snap install flutter"
- "brew tap leoafarias/fvm"
- "brew install fvm"
- "fvm install stable"
- "sudo apt-get install -y android-sdk sdkmanager"
- "sudo chown -R $(echo whoami):$(echo whoami) /usr/lib/android-sdk"
- "wget -O $TMP_INSTALL_PATH https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip"
- "mkdir -p /usr/lib/android-sdk/cmdline-tools/latest"
- "unzip $TMP_INSTALL_PATH -d /usr/lib/android-sdk"
- "mv /usr/lib/android-sdk/cmdline-tools/* /usr/lib/android-sdk/cmdline-tools/latest"
- "rm $TMP_INSTALL_PATH"
update:
- "brew upgrade fvm"
uninstall:
- "fvm remove stable"
- "brew uninstall fvm"
- "brew untap leoafarias/fvm"
- "sudo apt-get remove -y android-sdk sdkmanager"
personal_repos:
commands:
- machine_setup:
config: "$DOTFILES/personal_repositories.yaml"
no_repos:
commands:
- machine_setup:
config: "$DOTFILES/no_repositories.yaml"
ngrok:
commands:
- run:
env:
TMP_INSTALL_PATH: "/tmp/ngrok.zip"
commands:
install:
- "wget -O $TMP_INSTALL_PATH https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip"
- "unzip $TMP_INSTALL_PATH -d $HOME/.local/bin"
- "rm $TMP_INSTALL_PATH"
update:
- "ngrok update"
uninstall:
- "rm $HOME/.local/bin/ngrok"
edge:
commands:
- run:
commands:
install:
- "sudo wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg"
- "echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list"
- "sudo apt-get update"
- "sudo apt-get install -y microsoft-edge-stable"