Skip to content

Conversation

@rowansmithau
Copy link
Contributor

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
  • 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)
  • Changes tested locally

Related Issues

#678

Adds post_clone_script variable to the dotfiles module, enabling
startup coordination with other scripts that depend on dotfiles.

Closes #678
@rowansmithau rowansmithau self-assigned this Jan 29, 2026
@rowansmithau rowansmithau added the version:minor Add to PRs requiring a minor version upgrade label Jan 29, 2026
@github-actions
Copy link
Contributor

Version Bump Required

One or more modules in this PR need their versions updated.

To fix this:

  1. Run the version bump script locally:
    ./.github/scripts/version-bump.sh 
  2. Commit the changes:
    git add . && git commit -m "chore: bump module versions ()"
  3. Push your changes

The CI will automatically re-run once you push the updated versions.

@rowansmithau rowansmithau marked this pull request as ready for review January 29, 2026 03:52
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@matifali matifali removed their request for review January 29, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version:minor Add to PRs requiring a minor version upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant