[user] name = "Amolith" email = "amolith@secluded.site" [ui] pager = "delta" editor = "vim" show-cryptographic-signatures = true [signing] backend = "ssh" {{- if ne .chezmoi.username "exedev" }} behavior = "drop" {{- end }} {{- if eq .chezmoi.hostname "angmar" }} key = "{{ .chezmoi.homeDir }}/.ssh/yk-stationary.pub" {{- else }} key = "{{ .chezmoi.homeDir }}/.ssh/yk-mobile.pub" {{- end }} [signing.backends.ssh] allowed-signers = "/home/amolith/.ssh/allowed_signers" [git] {{- if ne .chezmoi.username "exedev" }} # Keep built-in push signing off so jj doesn't sign commits authored by others. sign-on-push = false {{- end }} [revset-aliases] 'closest_bookmark(to)' = 'heads(::to & bookmarks())' [aliases] tug = ["bookmark", "move", "--from", "closest_bookmark(@-)", "--to", "@-"] {{- if ne .chezmoi.username "exedev" }} # Use `jj push` (this alias), not `jj git push`. # It signs only our own mutable unsigned commits in the push range, then pushes. push = ["util", "exec", "--", "bash", "-c", """ set -euo pipefail remote="" args=("$@") i=0 while [ "$i" -lt "$#" ]; do arg="${args[$i]}" case "$arg" in --remote=*) remote="${arg#--remote=}" ;; --remote) i=$((i + 1)) if [ "$i" -lt "$#" ]; then remote="${args[$i]}" fi ;; esac i=$((i + 1)) done if [ -z "$remote" ]; then remote="$(jj config get git.push 2>/dev/null || true)" fi if [ -z "$remote" ]; then remote="origin" fi jj sign -r "mine() & mutable() & (remote_bookmarks(remote=${remote})..closest_bookmark(@))" jj git push "$@" """, ""] {{- end }}