diff options
| author | 2026-04-21 01:23:26 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:26 +0100 | |
| commit | 91c77a81a5f3c193eda8515e8ef053e80ea125ad (patch) | |
| tree | 4323e95768092358e0f39ececc0c0b25d6fb4dd2 | |
| parent | c8c6fa4fb6685ab4914ff014165a382e9d2db842 (diff) | |
| download | dotfiles-91c77a81a5f3c193eda8515e8ef053e80ea125ad.tar.gz dotfiles-91c77a81a5f3c193eda8515e8ef053e80ea125ad.tar.bz2 dotfiles-91c77a81a5f3c193eda8515e8ef053e80ea125ad.zip | |
refactor: revert auto-init, add dedicated 'just init' recipe
chezmoi init is only needed when .chezmoi.toml.tmpl changes, so running
it on every apply is unnecessary overhead. Run 'just init' manually
when the template changes.
| -rwxr-xr-x | .githooks/post-commit | 2 | ||||
| -rw-r--r-- | .github/copilot-instructions.md | 2 | ||||
| -rw-r--r-- | justfile | 9 |
3 files changed, 8 insertions, 5 deletions
diff --git a/.githooks/post-commit b/.githooks/post-commit index ce41b5c..d2d7eba 100755 --- a/.githooks/post-commit +++ b/.githooks/post-commit @@ -1,2 +1,2 @@ #!/bin/sh -chezmoi init --apply -S "$(git rev-parse --show-toplevel)" +chezmoi apply -S "$(git rev-parse --show-toplevel)" diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index b4cab5d..e5d066b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -19,7 +19,7 @@ The repo root is a chezmoi source directory. Files targeting `$HOME` use chezmoi - `create-efi.sh` is an interactive EFI boot entry creation script using `efibootmgr`. - `.chezmoiignore` excludes non-home files (`etc/`, `meta/`, `firefox/`, docs) from deployment to `$HOME`. - `.githooks/` contains git hooks (notably `post-commit` which runs `chezmoi apply`). Activate with `just install-hooks`. -- `justfile` provides recipes: `install-hooks`, `apply`, `install`, `install-all`, `add`, `status`, `groups`, `fix`. +- `justfile` provides recipes: `install-hooks`, `apply`, `init`, `install`, `install-all`, `add`, `status`, `groups`, `fix`. ## Window manager @@ -2,9 +2,13 @@ install-hooks: git config core.hooksPath .githooks -# Deploy dotfiles (regenerates config from template if it changed) +# Deploy dotfiles apply: - chezmoi init --apply -S . + chezmoi apply -S . + +# Regenerate chezmoi config from .chezmoi.toml.tmpl (run when the template changes) +init: + chezmoi init -S . # Install packages from one or more groups (e.g. just install base dev wayland) install *groups: @@ -80,7 +84,6 @@ status: done echo "" echo "=== Dotfile drift ===" - chezmoi init -S . >/dev/null 2>&1 || true chezmoi status -S . || true # Show install coverage for each group (or full breakdown for one group) |
