Skip to content

Commit 540caec

Browse files
committed
feat: migrate to devbox and chezmoi
1 parent e211390 commit 540caec

113 files changed

Lines changed: 4609 additions & 1796 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.chezmoi.yaml.tmpl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{{- $osID := .chezmoi.os -}}
2+
{{- if hasKey .chezmoi.osRelease "id" -}}
3+
{{- $osID = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}}
4+
{{- end -}}
5+
6+
{{- $name := promptStringOnce . "name" "Your name" -}}
7+
{{- $email := promptStringOnce . "email" "Your email (personal)" -}}
8+
9+
data:
10+
osid: {{ $osID | quote }}
11+
12+
# User info (prompted on first run)
13+
name: {{ $name | quote }}
14+
email: {{ $email | quote }}
15+
16+
# XDG directories
17+
xdg_config_home: "{{ .chezmoi.homeDir }}/.config"
18+
xdg_data_home: "{{ .chezmoi.homeDir }}/.local/share"
19+
xdg_cache_home: "{{ .chezmoi.homeDir }}/.cache"
20+
xdg_state_home: "{{ .chezmoi.homeDir }}/.local/state"
21+
22+
# Homebrew prefix (arm64 vs x86_64)
23+
homebrew_prefix: {{ if eq .chezmoi.arch "arm64" }}"/opt/homebrew"{{ else }}"/usr/local"{{ end }}
24+
25+
# Font directory
26+
font_dir: {{ if eq .chezmoi.os "darwin" }}"{{ .chezmoi.homeDir }}/Library/Fonts"{{ else }}"{{ .chezmoi.homeDir }}/.local/share/fonts"{{ end }}
27+
28+
edit:
29+
command: "nvim"
30+
31+
merge:
32+
command: "nvim"
33+
args: ["-d"]

.chezmoiignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Repository files (not dotfiles)
2+
README.md
3+
CLAUDE.md
4+
LICENSE
5+
justfile
6+
install.sh
7+
devbox.json
8+
devbox.lock
9+
10+
# Editor/tooling configs for this repo
11+
.editorconfig
12+
.stylua.toml
13+
.gitignore
14+
.gitkeep
15+
16+
# CI/IDE directories
17+
.github/
18+
19+
# macOS specific
20+
{{ if ne .chezmoi.os "darwin" }}
21+
Library/
22+
homebrew/
23+
{{ end }}
24+
25+
# Linux specific (servers don't need GUI terminal config)
26+
{{ if ne .chezmoi.os "linux" }}
27+
.config/i3/
28+
.config/sway/
29+
{{ end }}
30+
31+
# SSH/Server environment - skip GUI apps
32+
{{ if and (eq .chezmoi.os "linux") (env "SSH_CLIENT") }}
33+
.config/ghostty/
34+
{{ end }}
35+
36+
# Local files (never managed by chezmoi)
37+
.zshrc.local
38+
.config/zsh/local.zsh
39+
.env.local
40+
41+
# Claude Code - runtime/sensitive data (never add these)
42+
.claude/.anthropic/
43+
.claude/.claude.json
44+
.claude/debug/
45+
.claude/downloads/
46+
.claude/file-history/
47+
.claude/history.jsonl
48+
.claude/ide/
49+
.claude/image-cache/
50+
.claude/plans/
51+
.claude/plugins/
52+
.claude/projects/
53+
.claude/security_warnings_state_*.json
54+
.claude/session-env/
55+
.claude/shell-snapshots/
56+
.claude/stats-cache.json
57+
.claude/statsig/
58+
.claude/telemetry/
59+
.claude/todos/
60+
61+
# Prevent accidental addition of literal ~ paths

.claude/rules/chezmoi-template.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
paths: ["**/*.tmpl"]
3+
---
4+
5+
# Chezmoi Template Rules
6+
7+
## Template Syntax
8+
9+
- Use Go template syntax: `{{ .variable }}`, `{{- ... -}}` for whitespace control
10+
- Access chezmoi data via `.chezmoi.os`, `.chezmoi.arch`, `.chezmoi.homeDir`
11+
- Custom data defined in `.chezmoi.yaml.tmpl` accessed via `.name`, `.email`, `.business_use`, etc.
12+
13+
## Conditional Patterns
14+
15+
```
16+
{{- if eq .chezmoi.os "darwin" }}
17+
# macOS-specific content
18+
{{- end }}
19+
```
20+
21+
## Testing Changes
22+
23+
Always test template changes with both environments:
24+
```bash
25+
chezmoi execute-template < file.tmpl # Test with current config
26+
```

.claude/rules/nvim-lua.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
paths: ["dot_config/nvim/**/*.lua"]
3+
---
4+
5+
# Neovim Lua Rules
6+
7+
## Formatting
8+
9+
- Format with stylua (config in `.stylua.toml`)
10+
- Run `just fmt` before committing
11+
12+
## Plugin Structure
13+
14+
Plugins are organized in `dot_config/nvim/lua/plugins/`:
15+
- One file per plugin category (ui.lua, editor.lua, lsp.lua, etc.)
16+
- Uses lazy.nvim plugin manager with lazy-loading
17+
18+
## Style
19+
20+
- Prefer `vim.keymap.set()` over `vim.api.nvim_set_keymap()`
21+
- Use `<leader>` (Space) for custom keybindings
22+
- Group related options with comments

.claude/rules/zsh.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
paths: ["dot_zsh*.tmpl"]
3+
---
4+
5+
# Zsh Configuration Rules
6+
7+
## Structure
8+
9+
- `dot_zshenv.tmpl` - Environment variables only (loaded for all shells)
10+
- `dot_zshrc.tmpl` - Interactive shell config (aliases, functions, plugins)
11+
12+
## Syntax Checking
13+
14+
Chezmoi templates break zsh syntax checking. CI removes template syntax before checking:
15+
```bash
16+
sed 's/{{[^}]*}}//g' file.tmpl > /tmp/check.zsh && zsh -n /tmp/check.zsh
17+
```
18+
19+
## Performance
20+
21+
- Shell startup target: ~50ms
22+
- Uses zinit turbo mode for deferred plugin loading
23+
- Cache init scripts in `~/.cache/zsh/init/`

.claude/settings.json

Lines changed: 0 additions & 59 deletions
This file was deleted.

.config/czg/cz.config.mjs

Lines changed: 0 additions & 65 deletions
This file was deleted.

.config/gh/config.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.config/gwq/config.toml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)