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...@@ -144,11 +144,14 @@ in
144 signing = lib.mkIf (config.programs.git.signing.key != null) {144 signing = lib.mkIf (config.programs.git.signing.key != null) {
145 inherit (config.programs.git.signing) key;145 inherit (config.programs.git.signing) key;
146 backend = "gpg";146 backend = "gpg";
147 behavior = "own";147 # signatures are slow, compute them on push instead of on change.
148 behavior = "drop";
148 };149 };
149 git = {150 git = {
150 sign-on-push = true;151 sign-on-push = config.programs.git.signing.key != null;
151 push-new-bookmarks = true;152 };
153 remotes.origin = {
154 auto-track-bookmarks = "glob:*";
152 };155 };
153 ui = {156 ui = {
154 default-command = "log";157 default-command = "log";
users/clover/home.nix+53-10
...@@ -1,4 +1,9 @@...@@ -1,4 +1,9 @@
1{ pkgs, host, ... }:1{
2 pkgs,
3 host,
4 lib,
5 ...
6}:
2let7let
3 hostServer = false;8 hostServer = false;
4in9in
...@@ -66,8 +71,7 @@ in...@@ -66,8 +71,7 @@ in
66 jf = "jj git fetch";71 jf = "jj git fetch";
67 e = "jj edit";72 e = "jj edit";
68 d = "jj desc";73 d = "jj desc";
69 bup = "jj b m --from 'parents(@)' --to '@'";74 bup = "jj b m --from 'heads(::@- & bookmarks())' --to '@'";
70 push = "jj git push";
71 moveself = "jj rebase -r @ -d";75 moveself = "jj rebase -r @ -d";
72 logall = "jj log -r 'all()'";76 logall = "jj log -r 'all()'";
73 cherry = "jj git fetch && jj split -i -p -m 'SPLIT_CHANGES' && jj edit -r 'description(\"SPLIT_CHANGES\")' && jj desc -m '' --edit";77 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...@@ -83,19 +87,58 @@ in
83 uv run --project "$dirname" "$@"87 uv run --project "$dirname" "$@"
84 }88 }
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
86 function pr() {121 function pr() {
87 message=$(jj log -r '@' -T 'description' --no-graph)122 message=$(jj log -r '@' -T 'description' --no-graph)
88 if [[ -z "$message" ]] || [[ "$message" = "WIP:"* ]]; then123 if [[ -z "$message" ]] || [[ "$message" = "WIP:"* ]]; then
89 jj desc124 jj desc
125 message=$(jj log -r '@' -T 'description' --no-graph)
126 if [[ -z "$message" ]] || [[ "$message" = "WIP:"* ]]; then
127 exit
128 fi
90 fi129 fi
91 if [ -n "$1" ]; then130 if [ -n "$1" ]; then
92 jj git push --named "clo/$1"=@131 if [[ "clo"/* = "$1" ]]; then
93 branch="clo/$1"132 branch="$1";
133 else
134 branch="clo/$1"
135 fi
136 command jj git push --named "$branch"=@
94 else137 else
95 branch="$(jj log -r '@' -T '"clo/push-" ++ change_id.short()' --no-graph)"138 command jj git push -c @
96 jj git push -c @139 branch="$(jj log -r '@-' -T 'bookmarks.join("\n")' --no-graph | head -1)"
97 fi140 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="
99 }142 }
100 '';143 '';
101 };144 };
...@@ -104,7 +147,7 @@ in...@@ -104,7 +147,7 @@ in
104 git.userEmail = "git@paperclover.net";147 git.userEmail = "git@paperclover.net";
105 git.signing = {148 git.signing = {
106 signByDefault = true;149 signByDefault = true;
107 key = "C0D577FD799F9D11";150 key = lib.mkDefault "C0D577FD799F9D11";
108 };151 };
109152
110 jujutsu = {153 jujutsu = {
...@@ -175,7 +218,7 @@ in...@@ -175,7 +218,7 @@ in
175 };218 };
176 # ui.graph.style = "square";219 # ui.graph.style = "square";
177 revsets = {220 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)";
179 short-prefixes = "(trunk()..@)::";222 short-prefixes = "(trunk()..@)::";
180 };223 };
181 # templates.log = "hl_wip(self)";224 # templates.log = "hl_wip(self)";
users/clover/work/home.nix+1
...@@ -8,6 +8,7 @@...@@ -8,6 +8,7 @@
8 }8 }
9 '';9 '';
10 };10 };
11 programs.git.signing.key = "CE485807AE4068AF8508C8DC5CBB21841C7920AD";
11 home.packages = with pkgs; [12 home.packages = with pkgs; [
12 (bun.overrideAttrs (_: rec {13 (bun.overrideAttrs (_: rec {
13 version = "1.3.0";14 version = "1.3.0";