home-manager: Share Git and Jujutsu configuration
Update docs / update (push) Successful in 51s
CI / Check, build and cache nixfiles (push) Failing after 17m56s

Move Git, Git LFS and `diff-so-fancy` into the common home module.
Enable Jujutsu with the same identity and add it to the devshell.

Document `jj` workflows and prefer them in Jujutsu workspaces.
This commit is contained in:
2026-10-03 22:16:42 +01:00
parent e7ec6740f1
commit ee6b34dbd7
6 changed files with 70 additions and 19 deletions
+13 -5
View File
@@ -187,6 +187,13 @@ in churn.
## Conventions
- Prefer `jj` for status, diffs, history, commits, rebases and remote operations when it is
available and the checkout has a Jujutsu workspace. Use Git when `jj` is unavailable or the
checkout is Git-only, and for Git-specific tooling. The shared home config and devshell install
`jujutsu`; see [`docs/deployment.md#version-control`](docs/deployment.md#version-control) for
setup and the workflow. Inspect `jj status`, `jj diff` and `jj log` before editing; `jj`
snapshots working-copy changes automatically, so preserve existing user changes and use
explicit revisions when rewriting history or moving bookmarks.
- Format with `nixpkgs-fmt` (`fmt`). 2-space indent, `inherit (...)` blocks at the top of `let` —
prefer `inherit (lib) mkOption ...;` (and bare use) over qualifying inline as `lib.mkOption`.
**Ask before running `fmt`** — some files aren't canonically formatted, so `fmt` can reindent a
@@ -212,11 +219,12 @@ in churn.
command, option or upstream technical term such as QEMU's machine type.
- Commit subjects follow `area/scope: Capitalized summary` (e.g. `nixos/home: ...`); keep logically
distinct changes in separate commits. Aim for 50-character subjects and do not exceed 72
characters. Hard-wrap commit body lines at 72 characters; Git preserves an unwrapped `-m`
argument as one long line, so include literal line breaks or use a commit-message file. Before
reporting a commit, inspect `git show -s --format=%B HEAD` and amend it if any line exceeds 72
characters. A concise body describing the change and its rationale is welcome when the subject
alone does not provide enough context — keep it to the essentials rather than restating the diff.
characters. Hard-wrap commit body lines at 72 characters; `-m` preserves unwrapped text, so
include literal line breaks or use a commit-message file. Before reporting a commit, inspect
`jj log --no-graph -r <revision> -T description` (or `git show -s --format=%B HEAD` in a Git-only
checkout) and amend its description if any line exceeds 72 characters. A concise body describing
the change and its rationale is welcome when the subject alone does not provide enough context —
keep it to the essentials rather than restating the diff.
`Co-Authored-By` is the only trailer used here; do **not** add a `Claude-Session` link (or any
other session/tooling trailer).
- **"Logically distinct" means unrelated** — two different applications, two boxes that have nothing