aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/justfile
Commit message (Collapse)AuthorAgeFilesLines
* feat(justfile): add check-fmt and check recipes; pre-commit hookLibravatar sommerfeld46 hours1-9/+93
| | | | | | | | | | Split concerns: fmt-check (check-fmt) from lint. check-fmt mirrors fmt with each tool's --check/-d flag. check runs both as a single quality gate. A new .githooks/pre-commit runs 'just check' on every commit; bypass with git commit --no-verify. Also drop just --fmt --check and prettier --check from the lint recipe (they're format checks, belong in check-fmt).
* feat(justfile): add fmt and lint recipesLibravatar sommerfeld46 hours1-0/+179
| | | | | | | | | | | | | | | | | | | | | | Two recipes with matching shape: just fmt # format the whole repo just fmt <path> # format one file (dispatch by ext/filename/shebang) just lint # lint the whole repo just lint <path> # lint one file Dispatch: .lua stylua / selene *.sh + sh shebang shfmt / shellcheck .zshrc/.zprofile (no fmt) / shellcheck --shell=bash (best-effort) .py ruff format / ruff check justfile just --fmt / just --fmt --check .toml taplo format / taplo lint .md/.json/.jsonc/.yaml/.yml/.css prettier --write / --check If a required tool is missing, the recipe aborts with an install hint naming the package. Whole-repo mode aggregates non-zero exits in lint so you see every issue in one pass.
* fix(etc-restore): preserve mtime so pacman -Qkk sees file as unmodifiedLibravatar sommerfeld46 hours1-1/+3
| | | | | | | | | | 'bsdtar -xOf | doas tee' wrote pristine content but with mtime=now, which caused 'pacman -Qkk' (and therefore 'just etc') to still flag the file as drifted — pacman compares stored metadata, not content. Switch to 'doas bsdtar -xpf <archive> -C / <file>', which extracts the single file in place with its original owner, mode, and mtime from the package archive.
* feat(etc-restore): reset live /etc/<path> to pristine without repo round-tripLibravatar sommerfeld46 hours1-0/+35
| | | | | | | | | | Sibling to etc-reset but operates directly on /etc (via doas tee) and never touches the repo. Use when a live file has drifted from pristine but you don't want to track it: just etc-restore /etc/systemd/resolved.conf Previously this required a 2-step dance (etc-add + etc-untrack).
* chore(justfile): include services-drift in statusLibravatar sommerfeld46 hours1-2/+2
|
* feat(etc,readd): rename etc-drift to etc; add etc-readd + readdLibravatar sommerfeld46 hours1-3/+53
| | | | | | | | | | | - etc-drift → etc (the main entry point to the /etc subsystem). - New etc-readd: pull changes from live /etc back into tracked repo files (the /etc analog of 'chezmoi re-add'). No args refreshes all tracked files; explicit paths error if the file isn't already tracked (use etc-add to adopt). Skips unchanged files silently; runs 'just apply' only when something changed. - New top-level readd: 'chezmoi re-add' + 'just etc-readd'. One command to mirror live state back into the repo.
* feat(etc): auto-apply in etc-reset/etc-rm + add etc-untrackLibravatar sommerfeld46 hours1-5/+8
| | | | | | | | | | - etc-reset and etc-rm now chain 'just apply' at the end, so a single invocation leaves both repo and /etc consistent. - New etc-untrack recipe = etc-reset + etc-rm. One command to cleanly stop tracking an owned /etc file: before: just etc-reset X && just apply && just etc-rm X && just apply after : just etc-untrack X (etc-untrack doesn't apply to unowned files — use etc-rm.)
* feat(justfile): add etc-rm recipeLibravatar sommerfeld46 hours1-0/+23
| | | | | | | | | | | Removes one or more files from the repo's etc/ tree and tidies any now-empty parent directories (bounded to inside etc/). Leaves the live /etc copy untouched. Composes with etc-reset to stop tracking a file cleanly: just etc-reset /etc/foo.conf # repo → pristine just apply # deploy pristine to /etc just etc-rm etc/foo.conf # stop tracking; /etc unchanged
* refactor(etc-reset): write pristine into repo, not /etcLibravatar sommerfeld46 hours1-39/+27
| | | | | | | | | | | Operating on /etc directly created a two-source-of-truth problem: chezmoi apply would just redeploy the repo copy anyway, so we had to either refuse managed paths or bolt on a --force flag. New semantics: etc-reset overwrites etc/<path> in the repo with the pristine package contents (no doas needed, no /etc touched). User then runs 'just apply' to deploy. Unowned files are now an error (nothing to reset to) — remove them from the repo manually.
* perf(etc-diff,etc-upstream-diff): default to repo files, avoid doas when ↵Libravatar sommerfeld46 hours1-17/+25
| | | | | | | | | | | readable - etc-upstream-diff: default to iterating over repo-managed etc/ files instead of running full 'pacman -Qkk' (scans every installed package). Upstream drift only matters for files I actually track. - both recipes: read live /etc via plain cat when the file is world-readable; only fall back to 'doas cat' for restricted files (e.g. /etc/doas.conf 0600). Cuts doas round-trips for the common case.
* refactor(just): reorder status to dotfile-drift, pkg-drift, etc-driftLibravatar sommerfeld46 hours1-1/+1
| | | | | dotfile-drift is fastest so it gives immediate feedback; etc-drift is slowest (full pacman -Qkk pass) so it runs last.
* feat(just): include etc in status & diff recipesLibravatar sommerfeld46 hours1-4/+15
| | | | | | | - status now runs etc-drift alongside pkg-drift and dotfile-drift - diff routes /etc/* paths to etc-diff; with no arg, runs both chezmoi diff and etc-diff so drift in /etc is visible alongside $HOME dotfiles.
* fix(etc-diff,etc-upstream-diff): use doas cat for root-only live filesLibravatar sommerfeld46 hours1-4/+5
| | | | | | | /etc/doas.conf (0600) and similar mode-restricted files triggered 'Permission denied' when diff tried to read them as the user. Read via 'doas cat' on the live side; keep the repo/pristine side as the user since those are readable.
* feat(etc): diff/upstream-diff/add/reset recipes + ignore fstabLibravatar sommerfeld46 hours1-7/+149
| | | | | | | | | | | | | - etc-diff: diff repo-managed etc/<path> vs live /etc (defaults to all) - etc-upstream-diff: diff live /etc vs pristine pacman archive (defaults to pacman -Qkk modified set) - etc-add: copy /etc/<path> into the repo's etc/ tree - etc-reset: restore pristine via bsdtar -xpf, or rm if unowned; refuses managed paths without --force - ignore /etc/fstab (host-specific UUIDs/layout) - path-traversal guards on all recipe inputs - regular-file-only enforcement (no symlinks/dirs) - fail-fast with clear message if mirror can't supply installed version
* fix(etc-drift): match real pacman -Qkk "backup file:" prefix formatLibravatar sommerfeld46 hours1-1/+1
| | | | | | | | | Pacman emits lines like "backup file: <pkg>: <path> (<reason>)", not the "(Modified backup file)" suffix format. Anchor the path extraction to /etc/ to avoid catching stderr warnings interleaved into a line. Also extend etc/.ignore with /etc/{passwd,group,shells} — system-managed identity files that surfaced in the new drift output.
* fix(etc-drift): use pacman -Qkk for reliable modified-file detectionLibravatar sommerfeld46 hours1-1/+1
| | | | | | | The old -Qii regex "MODIFIED\s+/\S+" accidentally matched UNMODIFIED lines (no word boundary), which hid truly-modified configs like pacman.conf from the drift report. Switch to -Qkk which uses an explicit "Modified backup file" / "Altered backup file" tag that is unambiguous.
* fix(etc-drift): while loop must not exit with keep filter statusLibravatar sommerfeld46 hours1-2/+2
|
* fix(etc-drift): tolerate no-match grep and whitespace-separated MODIFIEDLibravatar sommerfeld46 hours1-3/+3
| | | | | | | - grep exits 1 when pattern has no matches; under pipefail that killed the recipe. Wrap both pipelines in `{ ...; } || true`. - pacman -Qii can separate MODIFIED from the path with spaces or a tab depending on formatting; use \s+ instead of \t.
* feat(etc): drift detection + auto-enumerating deploy templateLibravatar sommerfeld46 hours1-0/+42
| | | | | | | | | | | - `just etc-drift` reports /etc files modified from pacman defaults (via pacman -Qii) and user-created files (via pacman -Qo), subtracting already-managed paths and patterns listed in etc/.ignore. - Refactor run_onchange_after_deploy-etc.sh.tmpl to enumerate files under etc/ automatically via find; single combined hash via chezmoi output + sha256sum, so new files only need to be dropped into etc/. - etc/.ignore seeds noise filters: machine-id, ssh host keys, pacman keyring, mirrorlist, shadow/passwd backups, sbctl keys, ca-certs.
* feat(services): add .ignore list for distro-default noiseLibravatar sommerfeld46 hours1-1/+6
| | | | | | | | | | systemd-units/.ignore is a user-maintainable list of units to suppress from 'just services-drift' uncurated output. Starts with three systemd presets that are harmless noise: remote-fs.target, systemd-network-generator.service, systemd-userdbd.socket. The dotfile is outside the *.txt glob so services / services-enable don't accidentally pick it up.
* feat(services): curate tor + pcscd, filter @ templates from driftLibravatar sommerfeld46 hours1-1/+1
| | | | | | | | | | - tor.service -> systemd-units/btc.txt (pairs with tor in meta/btc.txt) - pcscd.socket -> systemd-units/base.txt (smartcards, used by GPG) - services-drift now filters @-template units (getty@ etc.), which are abstract and can't be curated meaningfully anyway systemd-networkd.{service,socket,wait-online} remain uncurated; that's a real decision (conflicts with iwd) left to disable by hand.
* feat(services): curated systemd units via just recipesLibravatar sommerfeld46 hours1-1/+53
| | | | | | | | | | | | | | | | Introduce systemd-units/<group>.txt files paired by name with meta groups (systemd-units/base.txt <-> meta/base.txt). Units listed there are enabled by a new 'just services-enable' recipe, wired into 'just init' so bootstrap.sh no longer needs its own systemctl loop. New justfile recipes (Services section): services list curated units with enabled/active state services-enable idempotent 'systemctl enable --now', soft-fail per unit services-drift two-way diff vs systemctl list-unit-files bootstrap.sh drops its hardcoded 9-unit loop and laptop TLP block (~22 lines); 'just init' now handles it. tlp.service lives directly in systemd-units/base.txt (no laptop gating).
* fix: 'just remove' only edits the list, never uninstallsLibravatar sommerfeld46 hours1-2/+1
| | | | | Package may belong to other groups; uninstall is the user's call (use 'just undeclared | paru -Rs -' afterward if desired).
* feat: add 'just remove' to drop packages from a group and uninstallLibravatar sommerfeld46 hours1-0/+20
|
* feat: 'just add' accepts multiple packagesLibravatar sommerfeld46 hours1-9/+11
|
* fix: pass --ask=4 to piped paru installs to auto-resolve conflictsLibravatar sommerfeld46 hours1-3/+3
| | | | | | Needed so the first 'just init' on a stock Arch system (sudo preinstalled) can swap sudo for doas-sudo-shim without a prompt pacman refuses to emit under --noconfirm.
* chore: drop --noconfirm from 'just add' (stdin-less invocations can prompt)Libravatar sommerfeld46 hours1-1/+1
|
* chore: add --noconfirm to all 'paru -S' invocations in justfileLibravatar sommerfeld46 hours1-4/+4
|
* feat: 'just undeclared' now considers only active (≥50%) groupsLibravatar sommerfeld46 hours1-16/+18
| | | | | | | | A package only listed in unadopted groups (e.g. steam in gaming on a non-gaming machine) now counts as undeclared. Extracts a hidden _active-packages helper so pkg-drift and undeclared share the same 'active list' logic.
* fix: align 'just groups' signalling with ≥50% thresholdLibravatar sommerfeld46 hours1-3/+3
| | | | | | - ✓ fully installed (100%) - ~ adopted but partial (≥50%, <100%) - ✗ not adopted (<50%, includes 0%)
* fix: 'just init' now deploys dotfiles after regenerating configLibravatar sommerfeld46 hours1-2/+2
|
* docs: fix 'just undeclared' doc comment (was collapsed by just)Libravatar sommerfeld46 hours1-2/+1
|
* feat: split drift recipes and add 'just undeclared'Libravatar sommerfeld46 hours1-7/+19
| | | | | | | | - 'just status' now a thin wrapper for 'pkg-drift + dotfile-drift' - 'just pkg-drift' and 'just dotfile-drift' are individually addressable - 'just undeclared' prints undeclared packages unindented, one per line, so they pipe cleanly into 'paru -Rs -' - pkg-drift reuses 'just undeclared' via sed to avoid duplicating logic
* feat: add 'just diff' and 'just merge' for chezmoi drift investigationLibravatar sommerfeld46 hours1-0/+13
| | | | | | Both accept an optional file path. 'just merge' without an argument runs chezmoi merge-all (interactive across all modified files); with an argument it merges just that one target.
* style: drop redundant [private] attribute (_-prefix already hides recipes)Libravatar sommerfeld46 hours1-2/+0
|
* refactor: reorganize justfile with sync wrapper and generalized initLibravatar sommerfeld46 hours1-37/+72
| | | | | | | | | | | | | - 'just sync' now wraps apply + fix for combined dotfile + package reconciliation - 'just init' generalized for first-time machine setup: regenerate chezmoi config, install git hooks, install base packages - Hidden helper recipes (_chezmoi-init, _install-hooks) via [private] so they don't clutter 'just --list' - Section banners organize the justfile into Setup, Day-to-day, Inspection, Package management, and Hidden helpers - Default recipe (bare 'just') shows the list - Doc comments reworded for clarity in the autocomplete menu
* refactor: revert auto-init, add dedicated 'just init' recipeLibravatar sommerfeld46 hours1-3/+6
| | | | | | 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.
* fix: use 'chezmoi init --apply' to regenerate config on template changesLibravatar sommerfeld46 hours1-2/+3
| | | | | | | When .chezmoi.toml.tmpl changes (e.g. adding [status] exclude=scripts), plain 'chezmoi apply' warns and keeps using the stale config. Using 'init --apply' regenerates the config from the template and applies in one step. Status does a silent init first for the same reason.
* fix: pass -S . to chezmoi so apply/status work from any CWDLibravatar sommerfeld46 hours1-2/+2
| | | | | | Without an explicit source, chezmoi defaults to ~/.local/share/chezmoi which doesn't exist on this setup. The post-commit hook uses git rev-parse so it works even if the hook is run from a subdirectory.
* refactor: 'just status' only reports missing for groups ≥50% installedLibravatar sommerfeld46 hours1-3/+18
| | | | | | Unadopted groups (e.g. gaming, nvidia on non-gaming/non-nvidia machines) no longer spam 'missing:' lines. Undeclared detection is unchanged — any installed package not in any list is still reported.
* refactor: raise 'just fix' threshold from ≥1 to ≥50% installedLibravatar sommerfeld46 hours1-6/+8
| | | | | | Avoids triggering on groups where only a single transitive dep happens to be installed. Also skips fully-installed groups (nothing to do).
* feat: add 'just fix' to top up partially-installed meta groupsLibravatar sommerfeld46 hours1-0/+15
| | | | | For each group with at least one package installed, install the rest via paru --needed. Never-installed groups (✗) stay untouched.
* feat: 'just groups <name>' shows per-package breakdown for one groupLibravatar sommerfeld46 hours1-2/+17
|
* feat: add 'just groups' recipe to show per-group install coverageLibravatar sommerfeld46 hours1-0/+20
| | | | | | | Shows install status for each meta group: ✓ (green) fully installed ~ (yellow) partially installed ✗ (red) nothing installed
* feat: add 'just add <group> <pkg>' recipeLibravatar sommerfeld46 hours1-0/+17
| | | | | Appends the package to meta/<group>.txt (if not already present) and installs it via paru --needed. Equivalent to chezmoi add for packages.
* refactor: replace meta/ PKGBUILDs with plain text package listsLibravatar sommerfeld46 hours1-0/+27
| | | | | | | | | | - Convert 16 PKGBUILD metapackages to simple .txt files (one package per line) - Delete all PKGBUILD, .SRCINFO, and .pkg.tar.zst binary artifacts - Clean stale packages: lf→yazi, tmux→zellij, neofetch→fastfetch, stow→chezmoi - Remove duplicate rustup in dev, duplicate mesa in intel - Add justfile recipes: install, install-all, status (unified drift detection) - Configure chezmoi to exclude scripts from status/diff output - Update copilot instructions
* feat: add tracked git hooks and justfileLibravatar sommerfeld46 hours1-0/+7
- .githooks/post-commit: runs chezmoi apply after every commit - justfile: 'just install-hooks' sets core.hooksPath - Added justfile and .githooks/ to .chezmoiignore