-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.conf.yaml
More file actions
292 lines (258 loc) · 12.9 KB
/
install.conf.yaml
File metadata and controls
292 lines (258 loc) · 12.9 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
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
# =============================================================================
# Dotbot Configuration - Dotfiles Installation
# =============================================================================
# Usage: ./install
# Dotbot docs: https://github.com/anishathalye/dotbot
#
# Structure:
# Phase 1 — Local operations (no network required, always succeeds)
# Phase 2 — Network-dependent operations (with timeouts, non-blocking)
# =============================================================================
# ===========================================================================
# Phase 1: Local Operations (no network required)
# ===========================================================================
# ---------------------------------------------------------------------------
# Defaults
# ---------------------------------------------------------------------------
- defaults:
link:
create: true
relink: true
# ---------------------------------------------------------------------------
# Clean broken symlinks
# ---------------------------------------------------------------------------
- clean: ["~"]
# ---------------------------------------------------------------------------
# Create directories
# ---------------------------------------------------------------------------
- create:
- ~/.vim/undo-history
- ~/.wastebasket
- ~/.config/karabiner
- ~/.codex
- ~/.gemini
# ---------------------------------------------------------------------------
# Git submodules (local if already initialized)
# ---------------------------------------------------------------------------
- shell:
- [git submodule update --init --recursive, Installing submodules]
# ---------------------------------------------------------------------------
# Platform-specific directory setup
# ---------------------------------------------------------------------------
- shell:
- [
test "$(uname)" = "Darwin" && mkdir -p ~/Library/Application\ Support/Cursor/User || true,
Creating Cursor config directory on macOS,
]
- [
test "$(uname)" = "Darwin" && mkdir -p ~/.config/iterm2 || true,
Creating iTerm2 config directory,
]
# ---------------------------------------------------------------------------
# Backup existing configs before symlinking
# ---------------------------------------------------------------------------
- shell:
- [
"test -f ~/.bashrc && ! test -L ~/.bashrc && ! test -f ~/.bashrc_bk && mv ~/.bashrc ~/.bashrc_bk && echo 'Moved existing ~/.bashrc to ~/.bashrc_bk' || true",
Backing up existing ~/.bashrc to ~/.bashrc_bk,
]
- [
"test -f ~/.zshrc && ! test -L ~/.zshrc && ! test -f ~/.zshrc_bk && mv ~/.zshrc ~/.zshrc_bk && echo 'Moved existing ~/.zshrc to ~/.zshrc_bk' || true",
Backing up existing ~/.zshrc to ~/.zshrc_bk,
]
# ---------------------------------------------------------------------------
# Symlinks
# ---------------------------------------------------------------------------
- link:
# ---- Shell ----
~/.zshrc: oh-my-zsh/zshrc
~/.bashrc: bash/bashrc
~/.common_shell_setup.sh: common_shell_setup.sh
# ---- Git ----
~/.gitconfig: git/gitconfig
# ---- Terminal multiplexer ----
~/.tmux.conf: tmux.conf
# ---- Editors ----
~/.vimrc: vim/vimrc/vimrc
~/.vim_runtime: vim/vimrc
~/.ideavimrc: ideavimrc
~/.config/nvim: neovim/nvim-basic-ide
# ---- File manager ----
~/.config/ranger: ranger
# ---- Debugger ----
~/.gdb: gdb
~/.gdbinit: gdb/gdbinit
# ---- Package managers (with CN mirrors) ----
~/.condarc: condarc
~/.mambarc: mambarc
~/.npmrc: npmrc
~/.config/pip/pip.conf: pip.conf
~/.cargo/config.toml: cargo/config.toml
# ---- Language config ----
~/.Rprofile: Rprofile
# ---- macOS window management ----
~/.yabairc: yabairc
~/.skhdrc: skhdrc
~/.skhd: skhd
~/.config/karabiner/karabiner.json: karabiner/karabiner.json
~/.config/karabiner/assets: karabiner/assets
# ---- IDE / Editor config ----
~/.vscoderc: vscode/vscoderc
~/Library/Application Support/Cursor/User/keybindings.json: cursor_config/keybindings.json
~/Library/Application Support/Cursor/User/settings.json: cursor_config/settings.json
~/Library/Application Support/Antigravity/User/keybindings.json: antigravity_config/keybindings.json
~/Library/Application Support/Antigravity/User/settings.json: antigravity_config/settings.json
# ---- AI tools ----
~/.claude/settings.json: claude/settings.json
~/.claude/config.json: claude/config.json
~/.claude/skills: claude/skills
~/.claude/agents: claude/agents
~/.claude/commands: claude/commands
~/.claude/hooks: claude/hooks
~/.claude/rules: claude/rules
~/.claude/scripts: claude/scripts
~/.codex/config.json: codex/config.json
~/.codex/settings.json: codex/settings.json
~/.codex/config.toml: codex/config.toml
~/.codex/codex_env.sh: codex/codex_env.sh
~/.gemini/settings.json: gemini/settings.json
~/.gemini/skills: gemini/skills
~/.chatgpt.sh: chatgpt
~/.config/opencode/opencode.json: opencode/opencode.json
~/.config/opencode/package.json: opencode/package.json
~/.local/bin/yolo: scripts/yolo-generic.sh
# ---- Cursor skills ----
~/.cursor/skills: cursor_config/skills
# ---- iTerm2 ----
~/.config/iterm2/com.googlecode.iterm2.plist: iterm2/com.googlecode.iterm2.plist
# ---------------------------------------------------------------------------
# Local post-link setup
# ---------------------------------------------------------------------------
- shell:
- [
chmod +x ~/.claude/hooks/check-expert-update.sh 2>/dev/null || true,
Setting execute permission for Claude hooks,
]
# ===========================================================================
# Phase 2: Network-Dependent Operations
# ===========================================================================
# All commands below use --connect-timeout / || true to avoid blocking
# when network is unavailable.
# ---------------------------------------------------------------------------
# Homebrew (macOS, must be before brew install commands)
# ---------------------------------------------------------------------------
- shell:
- [
'if [ "$(uname)" = "Darwin" ] && ! command -v brew >/dev/null 2>&1; then /bin/bash -c "$(curl --connect-timeout 10 -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"; fi || true',
Installing Homebrew on macOS if missing,
]
# ---------------------------------------------------------------------------
# Platform-specific packages
# ---------------------------------------------------------------------------
- shell:
- [
test "$(uname)" = "Linux" && command -v timeout >/dev/null && sudo timeout 300 apt-get install -y zsh tmux vim htop ranger bubblewrap || test "$(uname)" = "Linux" && sudo apt-get install -y zsh tmux vim htop ranger bubblewrap || true,
Installing zsh tmux vim htop ranger and bubblewrap on Linux (with 5min timeout),
]
# - [
# test "$(uname)" = "Darwin" && command -v brew >/dev/null && command -v timeout >/dev/null && timeout 300 brew install rg lazygit zellij bubblewrap || test "$(uname)" = "Darwin" && command -v brew >/dev/null && brew install rg lazygit zellij bubblewrap || true,
# Installing rg, lazygit, zellij and bubblewrap on macOS (with 5min timeout),
# ]
# ---------------------------------------------------------------------------
# oh-my-zsh
# ---------------------------------------------------------------------------
- shell:
- [
"test ! -d ~/.oh-my-zsh && sh -c \"$(curl --connect-timeout 10 -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\" || true",
Installing oh-my-zsh,
]
# ---------------------------------------------------------------------------
# oh-my-zsh plugins
# ---------------------------------------------------------------------------
- git:
"~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting":
url: "https://github.com/zsh-users/zsh-syntax-highlighting.git"
description: "zsh plugin: zsh-syntax-highlighting"
"~/.oh-my-zsh/custom/plugins/zsh-autosuggestions":
url: "https://github.com/zsh-users/zsh-autosuggestions"
description: "zsh plugin: zsh-autosuggestions"
"~/.oh-my-zsh/custom/plugins/zsh-wakatime":
url: "https://github.com/wbinglee/zsh-wakatime.git"
description: "zsh plugin: zsh-wakatime"
"~/.oh-my-zsh/custom/plugins/autojump":
url: "https://github.com/wting/autojump.git"
description: "zsh plugin: autojump"
"~/.oh-my-zsh/custom/plugins/zsh-vi-mode":
url: "https://github.com/jeffreytse/zsh-vi-mode.git"
description: "zsh plugin: zsh-vi-mode"
- shell:
- [
"test -d ~/.oh-my-zsh/custom/plugins/autojump && cd ~/.oh-my-zsh/custom/plugins/autojump && ./install.py || true",
Installing autojump,
]
# ---------------------------------------------------------------------------
# fzf
# ---------------------------------------------------------------------------
- git:
"~/.fzf":
url: "https://github.com/junegunn/fzf.git"
description: "fzf - fuzzy finder"
- shell:
- [test -d ~/.fzf && ~/.fzf/install --all || true, Installing fzf]
# ---------------------------------------------------------------------------
# Node.js (prerequisite for AI coding tools)
# ---------------------------------------------------------------------------
- shell:
- [
"command -v node >/dev/null || (export NVM_DIR=\"$HOME/.nvm\" && (test -d \"$NVM_DIR\" || curl --connect-timeout 10 -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash) && . \"$NVM_DIR/nvm.sh\" && nvm install --lts) || true",
Installing nvm and Node.js LTS,
]
# ---------------------------------------------------------------------------
# GitHub CLI
# ---------------------------------------------------------------------------
- shell:
- [
"command -v gh >/dev/null || { if [ \"$(uname)\" = \"Linux\" ]; then (type -p wget >/dev/null || sudo apt-get install -y wget) && sudo mkdir -p -m 755 /etc/apt/keyrings && wget --timeout=10 -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg >/dev/null && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | sudo tee /etc/apt/sources.list.d/github-cli.list >/dev/null && sudo apt-get update && sudo apt-get install -y gh; elif [ \"$(uname)\" = \"Darwin\" ]; then brew install gh; fi; } || true",
Installing GitHub CLI (gh),
]
# ---------------------------------------------------------------------------
# AI Coding Tools
# ---------------------------------------------------------------------------
# Manual install:
# Claude Code: curl -fsSL https://claude.ai/install.sh | bash
# OpenAI Codex: . ~/.nvm/nvm.sh; npm install -g @openai/codex
# Gemini CLI: . ~/.nvm/nvm.sh; npm install -g @google/gemini-cli
# Opencode: curl -fsSL https://opencode.ai/install | bash
- shell:
- [
"command -v claude >/dev/null || curl --connect-timeout 10 -fsSL https://claude.ai/install.sh | bash || true",
Installing Claude Code CLI,
]
- [
"export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; command -v codex >/dev/null || npm install -g @openai/codex || true",
Installing OpenAI Codex CLI,
]
- [
"export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"; command -v gemini >/dev/null || npm install -g @google/gemini-cli || true",
Installing Google Gemini CLI,
]
- [
"command -v opencode >/dev/null || curl --connect-timeout 10 -fsSL https://opencode.ai/install | bash || true",
Installing Opencode CLI,
]
# ---------------------------------------------------------------------------
# WeChat Reminder
# ---------------------------------------------------------------------------
- shell:
- [
"echo y | bash <(curl --connect-timeout 10 -s https://gitee.com/magic3007/wechat-reminder/raw/master/install-gitee.sh) || true",
Installing wechat-reminder,
]
# ---------------------------------------------------------------------------
# iTerm2 configuration
# ---------------------------------------------------------------------------
- shell:
- [
test "$(uname)" = "Darwin" && defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/.config/iterm2" && defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true || true,
Configuring iTerm2 to load preferences from ~/.config/iterm2,
]