fix: move package merge logic into install script template #1

Open
kitty wants to merge 2 commits from kitty/dotfiles-public:fix/package-merge-in-template into master
First-time contributor

Summary

  • .chezmoidata.yaml.tmpl was dead code - chezmoi doesn't support data template files
  • Local package overrides in .local/.chezmoidata.local/packages.yaml were being ignored
  • Moved merge logic into run_onchange_install-packages.sh.tmpl where it actually executes

What this fixes

The package customization system now works as intended:

  • enabledCategories merges packages from optional categories
  • customPackages adds user-specific packages (brews, casks, npm, uv)
  • Changes to any of the three data files trigger script re-runs

Test plan

  • Verify chezmoi cat ~/.chezmoiscripts/install-packages.sh shows merged packages
  • Add a test package to .local/.chezmoidata.local/packages.yaml and confirm it appears
  • Run chezmoi apply and verify packages install correctly
## Summary - `.chezmoidata.yaml.tmpl` was dead code - chezmoi doesn't support data template files - Local package overrides in `.local/.chezmoidata.local/packages.yaml` were being ignored - Moved merge logic into `run_onchange_install-packages.sh.tmpl` where it actually executes ## What this fixes The package customization system now works as intended: - `enabledCategories` merges packages from optional categories - `customPackages` adds user-specific packages (brews, casks, npm, uv) - Changes to any of the three data files trigger script re-runs ## Test plan - [ ] Verify `chezmoi cat ~/.chezmoiscripts/install-packages.sh` shows merged packages - [ ] Add a test package to `.local/.chezmoidata.local/packages.yaml` and confirm it appears - [ ] Run `chezmoi apply` and verify packages install correctly
fix: move package merge logic into install script template
Some checks are pending
Test Bootstrap Script / End-to-End Bootstrap Test (Alpine) (pull_request) Blocked by required conditions
61d34ca831
.chezmoidata.yaml.tmpl was never processed by chezmoi because
data template files are not supported - they must be static.
This caused local package overrides in .local/.chezmoidata.local/
to be ignored.

Move the merge logic directly into run_onchange_install-packages.sh.tmpl
where it executes at template render time. This enables:
- enabledCategories to merge optional package categories
- customPackages to add user-specific packages

Also add hash comments for all three data files so changes to any
of them trigger script re-runs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
chore: remove hardcoded .local submodule from repo
Some checks failed
Test Bootstrap Script / End-to-End Bootstrap Test (Alpine) (pull_request) Has been cancelled
d2e172005d
The .local submodule pointed to the maintainer's private repo which
other users cannot access. The bootstrap script already:
1. Removes this submodule reference after cloning
2. Adds .local/ to .gitignore
3. Lets users set up their own .local/ directory

This commit aligns the repo with what bootstrap produces, making it
cleaner for forks and reducing bootstrap complexity.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Some checks failed
Test Bootstrap Script / End-to-End Bootstrap Test (Alpine) (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • .chezmoiscripts/run_onchange_install-packages.sh.tmpl
  • .gitignore
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/package-merge-in-template:kitty-fix/package-merge-in-template
git switch kitty-fix/package-merge-in-template
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jmz/dotfiles-public!1
No description provided.