Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .chezmoi.toml.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[data.git]
name = {{ promptStringOnce . "git.name" "git.name" .chezmoi.username | quote }}
email = {{ promptStringOnce . "git.email" "git.email" "" | quote }}
signingkey = {{ promptStringOnce . "git.signingkey" "git.signingkey" "" | quote }}
signingKey = {{ promptStringOnce . "git.signingKey" "git.signingKey" "" | quote }}

[data.ssh]
bitwardenItem = {{ promptStringOnce . "ssh.bitwardenItem" "ssh.bitwardenItem" "" | quote }}
Expand Down
1 change: 1 addition & 0 deletions .chezmoiignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ justfile
{{- if not (env "BW_SESSION") }}
.ssh/config
.config/ngrok/ngrok.yml
Library/Application Support/ngrok/ngrok.yml
{{- end }}

{{- if ne .chezmoi.os "darwin" }}
Expand Down
12 changes: 0 additions & 12 deletions Library/Application Support/iTerm2/DynamicProfiles/chezmoi.json

This file was deleted.

153 changes: 153 additions & 0 deletions Library/Application Support/iTerm2/DynamicProfiles/chezmoi.json.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"Profiles": [
{
"Name": "Chezmoi",
"Guid": "6E4B62A6-1C73-4F91-8E32-DAC9C3FE3BBE",
"Dynamic Profile Parent Name": "Default",
"Normal Font": "JetBrainsMonoNFM-Regular 13",
"Non Ascii Font": "JetBrainsMonoNFM-Regular 13",
"Use Non-ASCII Font": false,
"Custom Command": "Yes",
"Command": "{{ if eq .chezmoi.arch "arm64" }}/opt/homebrew{{ else }}/usr/local{{ end }}/bin/fish --login",
"Use Separate Colors for Light and Dark Mode": false,
"Background Color": {
"Color Space": "sRGB",
"Red Component": 0.180392,
"Green Component": 0.203922,
"Blue Component": 0.25098
},
"Foreground Color": {
"Color Space": "sRGB",
"Red Component": 0.847059,
"Green Component": 0.870588,
"Blue Component": 0.913725
},
"Bold Color": {
"Color Space": "sRGB",
"Red Component": 0.847059,
"Green Component": 0.870588,
"Blue Component": 0.913725
},
"Cursor Color": {
"Color Space": "sRGB",
"Red Component": 0.847059,
"Green Component": 0.870588,
"Blue Component": 0.913725
},
"Cursor Text Color": {
"Color Space": "sRGB",
"Red Component": 0.180392,
"Green Component": 0.203922,
"Blue Component": 0.25098
},
"Selection Color": {
"Color Space": "sRGB",
"Red Component": 0.262745,
"Green Component": 0.298039,
"Blue Component": 0.368627
},
"Selected Text Color": {
"Color Space": "sRGB",
"Red Component": 0.847059,
"Green Component": 0.870588,
"Blue Component": 0.913725
},
"Ansi 0 Color": {
"Color Space": "sRGB",
"Red Component": 0.231373,
"Green Component": 0.258824,
"Blue Component": 0.321569
},
"Ansi 1 Color": {
"Color Space": "sRGB",
"Red Component": 0.74902,
"Green Component": 0.380392,
"Blue Component": 0.415686
},
"Ansi 2 Color": {
"Color Space": "sRGB",
"Red Component": 0.639216,
"Green Component": 0.745098,
"Blue Component": 0.54902
},
"Ansi 3 Color": {
"Color Space": "sRGB",
"Red Component": 0.921569,
"Green Component": 0.796078,
"Blue Component": 0.545098
},
"Ansi 4 Color": {
"Color Space": "sRGB",
"Red Component": 0.505882,
"Green Component": 0.631373,
"Blue Component": 0.756863
},
"Ansi 5 Color": {
"Color Space": "sRGB",
"Red Component": 0.705882,
"Green Component": 0.556863,
"Blue Component": 0.678431
},
"Ansi 6 Color": {
"Color Space": "sRGB",
"Red Component": 0.533333,
"Green Component": 0.752941,
"Blue Component": 0.815686
},
"Ansi 7 Color": {
"Color Space": "sRGB",
"Red Component": 0.898039,
"Green Component": 0.913725,
"Blue Component": 0.941176
},
"Ansi 8 Color": {
"Color Space": "sRGB",
"Red Component": 0.298039,
"Green Component": 0.337255,
"Blue Component": 0.415686
},
"Ansi 9 Color": {
"Color Space": "sRGB",
"Red Component": 0.74902,
"Green Component": 0.380392,
"Blue Component": 0.415686
},
"Ansi 10 Color": {
"Color Space": "sRGB",
"Red Component": 0.639216,
"Green Component": 0.745098,
"Blue Component": 0.54902
},
"Ansi 11 Color": {
"Color Space": "sRGB",
"Red Component": 0.921569,
"Green Component": 0.796078,
"Blue Component": 0.545098
},
"Ansi 12 Color": {
"Color Space": "sRGB",
"Red Component": 0.505882,
"Green Component": 0.631373,
"Blue Component": 0.756863
},
"Ansi 13 Color": {
"Color Space": "sRGB",
"Red Component": 0.705882,
"Green Component": 0.556863,
"Blue Component": 0.678431
},
"Ansi 14 Color": {
"Color Space": "sRGB",
"Red Component": 0.560784,
"Green Component": 0.737255,
"Blue Component": 0.733333
},
"Ansi 15 Color": {
"Color Space": "sRGB",
"Red Component": 0.92549,
"Green Component": 0.937255,
"Blue Component": 0.956863
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
{{- if $bitwardenItem }}
version: "3"
agent:
authtoken: {{ output "bw" "get" "notes" $bitwardenItem }}
authtoken: {{ output "bw" "get" "notes" $bitwardenItem "--nointeraction" }}
{{- end }}
31 changes: 31 additions & 0 deletions Library/private_LaunchAgents/local.mlx.coder-next.plist.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
<dict>
<key>Label</key>
<string>local.mlx.coder-next</string>

<key>ProgramArguments</key>
<array>
<string>{{ .chezmoi.homeDir }}/.local/bin/mlx_lm.server</string>
<string>--model</string>
<string>mlx-community/Qwen3-Coder-Next-4bit</string>
<string>--host</string>
<string>127.0.0.1</string>
<string>--port</string>
<string>8080</string>
<string>--prefill-step-size</string>
<string>512</string>
<string>--max-tokens</string>
<string>32768</string>
</array>

<key>StandardOutPath</key>
<string>/tmp/mlx-coder-next.log</string>

<key>StandardErrorPath</key>
<string>/tmp/mlx-coder-next-error.log</string>
</dict>
</plist>
29 changes: 29 additions & 0 deletions Library/private_LaunchAgents/local.mlx.qwen30b.plist.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
<dict>
<key>Label</key>
<string>local.mlx.qwen30b</string>

<key>ProgramArguments</key>
<array>
<string>{{ .chezmoi.homeDir }}/.local/bin/mlx_lm.server</string>
<string>--model</string>
<string>mlx-community/Qwen3-Coder-30B-A3B-Instruct-8bit</string>
<string>--host</string>
<string>127.0.0.1</string>
<string>--port</string>
<string>8080</string>
<string>--max-tokens</string>
<string>32768</string>
</array>

<key>StandardOutPath</key>
<string>/tmp/mlx-qwen30b.log</string>

<key>StandardErrorPath</key>
<string>/tmp/mlx-qwen30b-error.log</string>
</dict>
</plist>
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,38 @@ chezmoi apply --dry-run --verbose
chezmoi apply
```

Without `BW_SESSION`, chezmoi skips the private SSH and ngrok configs and leaves
existing copies untouched. An invalid session fails without prompting; unlock
Bitwarden again to include secrets in the diff or apply.

The installer includes Atuin and Zed on both supported platforms, plus Raycast
on macOS. The macOS `Chezmoi` iTerm2 profile launches fish with a Nord dark palette.
See [Setup](wiki/Setup.md) for updating an existing machine.

## Testing

Prerequisite: [just installed](https://github.com/casey/just).
Install [just](https://github.com/casey/just). Local checks also need Rust/Cargo;
template tests need Python 3 and chezmoi. Arch container tests need Docker running.

See [justfile](justfile) for available test commands.

Examples:

```bash
just test-arch
just check
just test-templates
just test-arch-ci
just test-arch-bootstrap-ci
```

See [Install Script Testing](wiki/Install-Script-Testing.md) for test scope and
Apple Silicon Docker limitations.

## Wiki

- [Setup](wiki/Setup.md)
- [Installed tools](wiki/Installed-Tools.md)
- [Bitwarden SSH hosts](wiki/Bitwarden-SSH.md)
- [Managing dotfiles](wiki/Managing-Dotfiles.md)
- [Template verification](wiki/Template-Verification.md)
- [Local AI](wiki/Local-AI.md)
7 changes: 7 additions & 0 deletions dot_config/fish/config.fish.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ fish_add_path "$HOME/.cargo/bin"
fish_add_path "$HOME/go/bin"
fish_add_path "$HOME/.local/bin"

if test -d "$HOME/.lando/bin"
fish_add_path "$HOME/.lando/bin"
end

if functions -q load_nvm
load_nvm > /dev/stderr
end
Expand Down Expand Up @@ -92,3 +96,6 @@ set -gx VISUAL zed
if status is-interactive
atuin init fish | source
end

alias qwen-heavy-off='launchctl kill SIGTERM gui/(id -u)/local.mlx.coder-next'
alias qwen-light-off='launchctl kill SIGTERM gui/(id -u)/local.mlx.qwen30b'
6 changes: 6 additions & 0 deletions dot_config/fish/functions/qwen-bootstrap.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function qwen-bootstrap
for name in local.mlx.coder-next local.mlx.qwen30b
launchctl bootout gui/(id -u)/$name
launchctl bootstrap gui/(id -u) "$HOME/Library/LaunchAgents/$name.plist"
end
end
4 changes: 4 additions & 0 deletions dot_config/fish/functions/qwen-heavy.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function qwen-heavy
launchctl kill SIGTERM gui/(id -u)/local.mlx.qwen30b 2>/dev/null
launchctl kickstart gui/(id -u)/local.mlx.coder-next
end
4 changes: 4 additions & 0 deletions dot_config/fish/functions/qwen-kill-all.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function qwen-kill-all
launchctl kill SIGTERM gui/(id -u)/local.mlx.coder-next 2>/dev/null
launchctl kill SIGTERM gui/(id -u)/local.mlx.qwen30b 2>/dev/null
end
4 changes: 4 additions & 0 deletions dot_config/fish/functions/qwen-light.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function qwen-light
launchctl kill SIGTERM gui/(id -u)/local.mlx.coder-next 2>/dev/null
launchctl kickstart gui/(id -u)/local.mlx.qwen30b
end
2 changes: 1 addition & 1 deletion dot_config/private_ngrok/private_ngrok.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
{{- if $bitwardenItem }}
version: "3"
agent:
authtoken: {{ output "bw" "get" "notes" $bitwardenItem }}
authtoken: {{ output "bw" "get" "notes" $bitwardenItem "--nointeraction" }}
{{- end }}
6 changes: 3 additions & 3 deletions dot_gitconfig.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
useConfigOnly = true
name = {{ .git.name }}
email = {{ .git.email }}
{{- if .git.signingkey }}
signingKey = {{ .git.signingkey }}
{{- if .git.signingKey }}
signingKey = {{ .git.signingKey }}
{{- end }}

[init]
Expand Down Expand Up @@ -89,5 +89,5 @@
line-numbers = true
{{ end }}

[includeIf "gitdir:~/Code/work/n"]
[includeIf "gitdir:~/Code/work/n/**"]
path = ~/.config/git/n.inc
6 changes: 6 additions & 0 deletions installer/packages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ pacman = [
"git",
"git-lfs",
"fish",
"atuin",
"neovim",
"zed",
"tree-sitter-cli",
"base-devel",
"wl-clipboard",
Expand Down Expand Up @@ -59,6 +61,7 @@ formula = [
"git",
"git-lfs",
"fish",
"atuin",
"neovim",
"tree-sitter-cli",
"ripgrep",
Expand Down Expand Up @@ -102,6 +105,8 @@ casks = [
"ngrok",
"utm",
"iterm2",
"zed",
"raycast",
]

[cargo]
Expand All @@ -126,6 +131,7 @@ packages = [
install_uv = true
packages = [
{ check = "harlequin", package = "harlequin" },
{ check = "mlx-lm", package = "mlx-lm" },
]

[fish]
Expand Down
Loading
Loading