authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-12-12 18:20:00-08:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-12-12 18:20:00-08:00
log805848d13e1e4a69204c90497033d2edac055443
tree02f160ead3278d001e8ee3c1f3ec5cde4232f991
parentf36770dc30f728e971948dee2012044d73740996
signature Commit is signed but in an unrecognized format.

clover: at work


3 files changed, 60 insertions(+), 13 deletions(-)

modules/home/default.nix+6-3
......@@ -144,11 +144,14 @@ in
144144 signing = lib.mkIf (config.programs.git.signing.key != null) {
145145 inherit (config.programs.git.signing) key;
146146 backend = "gpg";
147 behavior = "own";
147 # signatures are slow, compute them on push instead of on change.
148 behavior = "drop";
148149 };
149150 git = {
150 sign-on-push = true;
151 push-new-bookmarks = true;
151 sign-on-push = config.programs.git.signing.key != null;
152 };
153 remotes.origin = {
154 auto-track-bookmarks = "glob:*";
152155 };
153156 ui = {
154157 default-command = "log";
users/clover/home.nix+53-10
......@@ -1,4 +1,9 @@
1{ pkgs, host, ... }:
1{
2 pkgs,
3 host,
4 lib,
5 ...
6}:
27let
38 hostServer = false;
49in
......@@ -66,8 +71,7 @@ in
6671 jf = "jj git fetch";
6772 e = "jj edit";
6873 d = "jj desc";
69 bup = "jj b m --from 'parents(@)' --to '@'";
70 push = "jj git push";
74 bup = "jj b m --from 'heads(::@- & bookmarks())' --to '@'";
7175 moveself = "jj rebase -r @ -d";
7276 logall = "jj log -r 'all()'";
7377 cherry = "jj git fetch && jj split -i -p -m 'SPLIT_CHANGES' && jj edit -r 'description(\"SPLIT_CHANGES\")' && jj desc -m '' --edit";
......@@ -83,19 +87,58 @@ in
8387 uv run --project "$dirname" "$@"
8488 }
8589
90 function bun() {
91 if [[ "$1" = "build" ]]; then
92 command bun run "$@"
93 elif [[ "$1" = "bundle" ]]; then
94 shift
95 command bun build "$@"
96 else
97 command bun "$@"
98 fi
99 }
100
101 function jj() {
102 if [[ "$*" = "git push"* ]] && [[ "$*" != *"--dry-run"* ]]; then
103 command jj "$@" --dry-run
104 printf "Press any key to continue... "
105 read -r
106 command jj "$@"
107 else
108 command jj "$@"
109 fi
110 }
111
112 function push() {
113 command jj git push "$@" --dry-run
114 printf "Press any key to continue... "
115 read -r
116 if bash -c 'cd $(jj workspace root); bun local-ci'; then
117 command jj git push "$@"
118 fi
119 }
120
86121 function pr() {
87122 message=$(jj log -r '@' -T 'description' --no-graph)
88123 if [[ -z "$message" ]] || [[ "$message" = "WIP:"* ]]; then
89124 jj desc
125 message=$(jj log -r '@' -T 'description' --no-graph)
126 if [[ -z "$message" ]] || [[ "$message" = "WIP:"* ]]; then
127 exit
128 fi
90129 fi
91130 if [ -n "$1" ]; then
92 jj git push --named "clo/$1"=@
93 branch="clo/$1"
131 if [[ "clo"/* = "$1" ]]; then
132 branch="$1";
133 else
134 branch="clo/$1"
135 fi
136 command jj git push --named "$branch"=@
94137 else
95 branch="$(jj log -r '@' -T '"clo/push-" ++ change_id.short()' --no-graph)"
96 jj git push -c @
138 command jj git push -c @
139 branch="$(jj log -r '@-' -T 'bookmarks.join("\n")' --no-graph | head -1)"
97140 fi
98 open "$(git remote get-url origin | sed 's/git@github\.com:/https:\/\/github.com\//' | sed 's/\.git$//')/compare/master...$branch"
141 open "$(git remote get-url origin | sed 's/git@github\.com:/https:\/\/github.com\//' | sed 's/\.git$//')/compare/master...$branch?quick_pull=1&labels=awaiting+code+review,awaiting+functionality+review&body="
99142 }
100143 '';
101144 };
......@@ -104,7 +147,7 @@ in
104147 git.userEmail = "git@paperclover.net";
105148 git.signing = {
106149 signByDefault = true;
107 key = "C0D577FD799F9D11";
150 key = lib.mkDefault "C0D577FD799F9D11";
108151 };
109152
110153 jujutsu = {
......@@ -175,7 +218,7 @@ in
175218 };
176219 # ui.graph.style = "square";
177220 revsets = {
178 log = "ancestors(description(regex:\"^(WIP:|\\\\s+$)\"):: | working_copies() | bookmarks(\"master\")::remote_bookmarks(\"master\") | bookmarks(glob:\"clo/*\")::, 5)";
221 log = "ancestors(description(regex:\"^(WIP:|\\\\s+$)\"):: | working_copies() | bookmarks(exact:\"master\")::remote_bookmarks(exact:\"master\") | bookmarks(glob:\"clo/*\")::, 5)";
179222 short-prefixes = "(trunk()..@)::";
180223 };
181224 # templates.log = "hl_wip(self)";
users/clover/work/home.nix+1
......@@ -8,6 +8,7 @@
88 }
99 '';
1010 };
11 programs.git.signing.key = "CE485807AE4068AF8508C8DC5CBB21841C7920AD";
1112 home.packages = with pkgs; [
1213 (bun.overrideAttrs (_: rec {
1314 version = "1.3.0";