Rowan Smith
563dbc4a71
feat: add post_clone_script to dotfiles in order to support startup dependencies/coordination (#679)
## Description
Adds post_clone_script variable to the dotfiles module, enabling startup
coordination with other scripts that depend on dotfiles.
An example of how to use this, which assumes the PR has been merged:
```
module "dotfiles" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/coder/dotfiles/coder"
version = "1.3.0"
agent_id = coder_agent.main.id
default_dotfiles_uri = "https://github.com/someuser/somedotfiles"
post_clone_script = <<-EOF
coder exp sync start dotfiles && coder exp sync complete dotfiles
EOF
}
resource "coder_script" "personalize" {
count = data.coder_workspace.me.start_count
agent_id = coder_agent.main.id
display_name = "Personalize"
icon = "/icon/personalize.svg"
run_on_start = true
script = <<-EOF
trap 'coder exp sync complete personalize' EXIT
coder exp sync want personalize dotfiles
coder exp sync start personalize
SCRIPT="$HOME/.config/coderv2/dotfiles/personalize"
if [ -f "$SCRIPT" ] && [ -x "$SCRIPT" ]; then
$SCRIPT
fi
EOF
}
```
## Type of Change
- [ ] New module
- [ ] New template
- [ ] Bug fix
- [x] Feature/enhancement
- [ ] Documentation
- [ ] Other
## Module Information
**Path:** `registry/coder/modules/dotfiles`
**New version:** `v1.3.0`
**Breaking change:** [ ] Yes [x] No
## Testing & Validation
- [ ] Tests pass (`bun test`)
- [ ] Code formatted (`bun fmt`)
- [x] Changes tested locally
## Related Issues
#678
2026-02-16 09:14:50 +11:00
..
2026-02-13 22:05:21 +05:30
2026-01-30 09:31:04 +02:00
2025-11-26 13:37:19 -06:00
2025-11-26 13:37:19 -06:00
2025-11-26 13:37:19 -06:00
2025-12-02 15:41:21 -06:00
2025-07-22 19:48:01 -05:00
2025-07-22 19:48:01 -05:00
2026-02-09 07:54:15 -06:00
2026-01-13 07:53:27 -06:00
2025-11-26 13:37:19 -06:00
2025-11-27 17:35:40 +05:00
2025-11-27 12:00:04 +05:00
2026-02-16 09:14:50 +11:00
2025-12-31 11:40:52 +00:00
2025-07-22 19:48:01 -05:00
2025-07-22 19:48:01 -05:00
2025-12-15 11:19:11 -06:00
2025-11-26 13:37:19 -06:00
2026-02-04 09:34:02 -06:00
2026-01-05 14:59:06 -06:00
2025-11-26 13:37:19 -06:00
2025-11-26 13:37:19 -06:00
2026-01-07 01:06:31 +05:00
2026-01-15 01:22:37 +05:00
2025-11-26 13:37:19 -06:00
2025-12-02 13:17:39 -06:00
2025-11-26 13:37:19 -06:00
2025-11-26 13:37:19 -06:00
2026-02-04 09:10:27 +05:00
2026-02-11 07:34:37 +00:00
2025-11-27 17:35:40 +05:00
2025-11-26 13:37:19 -06:00
2026-02-14 23:08:12 +01:00
2025-11-26 13:37:19 -06:00
2025-11-26 13:37:19 -06:00
2025-11-27 12:00:04 +05:00
2025-12-31 09:04:47 +05:00
2025-11-27 12:00:04 +05:00
2025-11-27 12:00:04 +05:00
2025-11-27 12:00:04 +05:00
2025-11-27 17:35:40 +05:00
2025-11-27 17:35:40 +05:00
2025-11-27 12:00:04 +05:00
2025-11-26 13:37:19 -06:00
2025-11-27 17:35:40 +05:00
2025-12-17 16:17:06 -06:00