authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2026-02-12 17:42:07-08:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2026-02-12 17:42:07-08:00
logbf2aa37dfed7251828377aa2c825a5b82519ba26
tree473b1404775bb95b1b56b1684b9bd30ced3ff59b
parentda5d73d299727e1ad798b91024d613216bfc5856
parent4ce547cd1090c98735622fc88e72ab9bf7e34b5a
signature Commit is signed but in an unrecognized format.

Merge branch 'main' of paperclover.dev:nix/config


6 files changed, 96 insertions(+), 156 deletions(-)

flake.lock+25-4
......@@ -14,6 +14,11 @@
1414 "owner": "tadfisher",
1515 "repo": "android-nixpkgs",
1616 "rev": "7a6a0f7ad4195b792d8c59caf03e877a535ecd4b",
17 "lastModified": 1767990299,
18 "narHash": "sha256-Jz+cp9Ln4++1XiKw9KvZEM2dJ9AdOvayk97ybi9g7zc=",
19 "owner": "tadfisher",
20 "repo": "android-nixpkgs",
21 "rev": "449f2cadee7cb7b665aea209a67f8ecf30176653",
1722 "type": "github"
1823 },
1924 "original": {
......@@ -465,6 +470,22 @@
465470 }
466471 },
467472 "nixpkgs_4": {
473 "locked": {
474 "lastModified": 1764242076,
475 "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
476 "owner": "NixOS",
477 "repo": "nixpkgs",
478 "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
479 "type": "github"
480 },
481 "original": {
482 "owner": "NixOS",
483 "ref": "nixos-unstable",
484 "repo": "nixpkgs",
485 "type": "github"
486 }
487 },
488 "nixpkgs_5": {
468489 "locked": {
469490 "lastModified": 1762111121,
470491 "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=",
......@@ -480,7 +501,7 @@
480501 "type": "github"
481502 }
482503 },
483 "nixpkgs_5": {
504 "nixpkgs_6": {
484505 "locked": {
485506 "lastModified": 1708161998,
486507 "narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=",
......@@ -496,7 +517,7 @@
496517 "type": "github"
497518 }
498519 },
499 "nixpkgs_6": {
520 "nixpkgs_7": {
500521 "locked": {
501522 "lastModified": 1717696253,
502523 "narHash": "sha256-1+ua0ggXlYYPLTmMl3YeYYsBXDSCqT+Gw3u6l4gvMhA=",
......@@ -819,7 +840,7 @@
819840 "inputs": {
820841 "flake-compat": "flake-compat_2",
821842 "flake-utils": "flake-utils_3",
822 "nixpkgs": "nixpkgs_5"
843 "nixpkgs": "nixpkgs_6"
823844 },
824845 "locked": {
825846 "lastModified": 1770598090,
......@@ -863,7 +884,7 @@
863884 "flake-utils": "flake-utils_4",
864885 "gitignore": "gitignore_2",
865886 "langref": "langref",
866 "nixpkgs": "nixpkgs_6",
887 "nixpkgs": "nixpkgs_7",
867888 "zig-overlay": "zig-overlay"
868889 },
869890 "locked": {
modules/home/default.nix+10-8
......@@ -140,17 +140,19 @@ in
140140 jujutsu = {
141141 settings = {
142142 user = {
143 email = config.programs.git.userEmail;
144 name = config.programs.git.userName;
143 inherit (config.programs.git.settings.user) name email;
145144 };
146 signing = lib.mkIf (config.programs.git.signing.key != null) {
147 inherit (config.programs.git.signing) key;
148 backend = "gpg";
149 behavior = "own";
145 signing = lib.mkIf (config.programs.git.signing.format != null) {
146 backend = config.programs.git.signing.format;
147 key = "~/.ssh/id_ed25519.pub";
148 # signatures are slow, compute them on push instead of on change.
149 behavior = "drop";
150150 };
151151 git = {
152 sign-on-push = true;
153 push-new-bookmarks = true;
152 sign-on-push = config.programs.git.signing.key != null;
153 };
154 remotes.origin = {
155 auto-track-bookmarks = "glob:*";
154156 };
155157 ui = {
156158 default-command = "log";
modules/neovim/default.nix+3-3
......@@ -82,7 +82,7 @@
8282 servers.nixd.init_options.autoArchive = true;
8383 };
8484 treesitter = {
85 enable = true;
85 enable = false;
8686 addDefaultGrammars = true;
8787 };
8888 debugger.nvim-dap = {
......@@ -91,7 +91,7 @@
9191 };
9292 languages = {
9393 enableFormat = true;
94 enableTreesitter = true;
94 enableTreesitter = false;
9595 enableExtraDiagnostics = true;
9696 # enable debug adapter protocol by default
9797 enableDAP = true;
......@@ -109,7 +109,7 @@
109109 zig.enable = true;
110110 # sort-lines: off
111111
112 nix.lsp.servers = "nixd";
112 nix.lsp.servers = [ "nixd" ];
113113 };
114114 filetree.neo-tree = {
115115 enable = true;
users/clover/home.nix+57-139
......@@ -1,4 +1,9 @@
1{ pkgs, host, ... }:
1{
2 config,
3 pkgs,
4 host,
5 ...
6}:
27let
38 hostServer = false;
49in
......@@ -16,18 +21,15 @@ in
1621 nh
1722 autofmt
1823 gnupg
24 nodejs_24
1925 ];
2026 # packages to install for desktop environments (non-server)
2127 desktop = [
22 lazygit
23 jjui
2428 ];
2529 # packages to install on all servers
2630 server = [ ];
2731 # packages to install on macOS desktops
28 darwin = [
29 raycast
30 ];
32 darwin = [ ];
3133 # packages to install on linux desktops
3234 linux = [
3335 ];
......@@ -59,6 +61,7 @@ in
5961 # zsh is the shell i use
6062 zsh = {
6163 enable = true;
64 dotDir = "${config.xdg.configHome}/zsh";
6265 shellAliases = {
6366 switch = "~/config/switch";
6467
......@@ -66,8 +69,7 @@ in
6669 jf = "jj git fetch";
6770 e = "jj edit";
6871 d = "jj desc";
69 bup = "jj b m --from 'parents(@)' --to '@'";
70 push = "jj git push";
72 bup = "jj b m --from 'heads(::@- & bookmarks())' --to '@'";
7173 moveself = "jj rebase -r @ -d";
7274 logall = "jj log -r 'all()'";
7375 cherry = "jj git fetch && jj split -i -p -m 'SPLIT_CHANGES' && jj edit -r 'description(\"SPLIT_CHANGES\")' && jj desc -m '' --edit";
......@@ -83,28 +85,42 @@ in
8385 uv run --project "$dirname" "$@"
8486 }
8587
86 function pr() {
87 message=$(jj log -r '@' -T 'description' --no-graph)
88 if [[ -z "$message" ]] || [[ "$message" = "WIP:"* ]]; then
89 jj desc
88 function bun() {
89 if [[ "$1" = "build" ]]; then
90 command bun run "$@"
91 elif [[ "$1" = "bundle" ]]; then
92 shift
93 command bun build "$@"
94 else
95 command bun "$@"
9096 fi
91 if [ -n "$1" ]; then
92 jj git push --named "clo/$1"=@
93 branch="clo/$1"
97 }
98
99 function jj() {
100 if [[ "$*" = "git push"* ]] && [[ "$*" != *"--dry-run"* ]]; then
101 command jj "$@" --dry-run
102 printf "Press any key to continue... "
103 read -r
104 command jj "$@"
94105 else
95 branch="$(jj log -r '@' -T '"clo/push-" ++ change_id.short()' --no-graph)"
96 jj git push -c @
106 command jj "$@"
97107 fi
98 open "$(git remote get-url origin | sed 's/git@github\.com:/https:\/\/github.com\//' | sed 's/\.git$//')/compare/master...$branch"
99108 }
100109 '';
101110 };
102111
103 # use a git-specific email
104 git.userEmail = "git@paperclover.net";
105 git.signing = {
106 signByDefault = true;
107 key = "C0D577FD799F9D11";
112 git = {
113 # use a git-specific email
114 settings.user.email = "git@paperclover.net";
115 settings.gpg.ssh.allowedSignersFile = "${pkgs.writeText "allowed_signers" ''
116 git@paperclover.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAVa1aq1LEj/VXHJYlR5HJpK65lS/9jOL/dAB9ZS1chd
117 ''}";
118 # signing
119 signing = {
120 signByDefault = true;
121 key = "~/.ssh/id_ed25519";
122 format = "ssh";
123 };
108124 };
109125
110126 jujutsu = {
......@@ -175,137 +191,39 @@ in
175191 };
176192 # ui.graph.style = "square";
177193 revsets = {
178 log = "ancestors(description(regex:\"^(WIP:|\\\\s+$)\"):: | working_copies() | bookmarks(\"master\")::remote_bookmarks(\"master\") | bookmarks(glob:\"clo/*\")::, 5)";
179194 short-prefixes = "(trunk()..@)::";
180195 };
181 # templates.log = "hl_wip(self)";
182
183 template-aliases = {
184 # log template, highlighting the WIP commits by making everything else faded out
185 "hl_wip(commit)" = ''
186 if(commit.root(), format_root_commit(commit),
187 label("__commit__",
188 format_short_commit_header(commit) ++ "\n" ++
189 format_commit_description(commit)
190 )
191 )
192 '';
193
194 "format_commit_description(commit)" = ''
195 label("desc", format_commit_firstline(commit.description().first_line())) ++
196 "\n" ++ if(
197 commit.description().starts_with("WIP:") || commit.current_working_copy(),
198 commit.description().remove_prefix(commit.description().first_line()).remove_prefix("\n").trim_end() ++ "\n ",
199 if(commit.description().remove_prefix(commit.description().first_line()).trim().len() > 0,
200 label("muted", lines_collapsed(commit.description().lines().filter(|x| x.trim().len() > 0).len() - 1)),
201 " "
202 )
203 )
204 '';
205 "lines_collapsed(count)" =
206 ''("[" ++ stringify(count ++ " line" ++ if(count == 1, "", "s")) ++ " collapsed]\n")'';
207 "format_commit_firstline(line)" = ''
208 if(line.starts_with("WIP:"),
209 label("cc_wip", " WIP ") ++ " " ++ format_commit_firstline_a_wip(line.remove_prefix("WIP:").trim()),
210 format_commit_firstline_a_wip(line)
211 )
212 '';
213 "format_commit_firstline_a_wip(line)" = ''
214 if(line.starts_with("feat:") || line.starts_with("feat("),
215 label("cc_feat", "feat") ++ format_commit_firstline_a_cc_type(line.remove_prefix("feat")),
216 if(line.starts_with("fix:") || line.starts_with("fix("),
217 label("cc_fix", "fix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("fix")),
218 if(line.starts_with("hotfix:") || line.starts_with("hotfix("),
219 label("cc_hotfix", "hotfix") ++ format_commit_firstline_a_cc_type(line.remove_prefix("hotfix")),
220 if(line.starts_with("chore:") || line.starts_with("chore("),
221 label("cc_chore", "chore") ++ format_commit_firstline_a_cc_type(line.remove_prefix("chore")),
222 if(line.starts_with("test:") || line.starts_with("test("),
223 label("cc_other", "test") ++ format_commit_firstline_a_cc_type(line.remove_prefix("test")),
224 if(line.starts_with("refactor:") || line.starts_with("refactor("),
225 label("cc_other", "refactor") ++ format_commit_firstline_a_cc_type(line.remove_prefix("refactor")),
226 if(line.starts_with("perf:") || line.starts_with("perf("),
227 label("cc_other", "perf") ++ format_commit_firstline_a_cc_type(line.remove_prefix("perf")),
228 if(line.starts_with("lib:") || line.starts_with("lib("),
229 label("cc_other", "lib") ++ format_commit_firstline_a_cc_type(line.remove_prefix("lib")),
230 label("cc_header", line)
231 ))))))))
232 '';
233 "format_commit_firstline_a_cc_type(rest)" = ''
234 if(rest.starts_with("(") && rest.contains(")"),
235 format_firstline_cc_scope(rest, index_of_close_paren(rest)),
236 format_firstline_a_cc(rest))
237 '';
238 "format_firstline_cc_scope(rest, index)" = ''
239 label("cc_scope", rest.substr(0, index)) ++ format_firstline_a_cc(rest.substr(index, rest.len()))
240 '';
241 "format_firstline_a_cc(rest)" = ''
242 if(rest.starts_with(":"),
243 label("muted", ":") ++ label("cc_header", rest.remove_prefix(":")),
244 label("cc_header", rest)
245 )
246 '';
247 # sorry!
248 "index_of_close_paren(line)" = ''
249 stringify(if(line.substr(1, 2) == ")", "A",
250 if(line.substr(2, 3) == ")", "AA",
251 if(line.substr(3, 4) == ")", "AAA",
252 if(line.substr(4, 5) == ")", "AAAA",
253 if(line.substr(5, 6) == ")", "AAAAA",
254 if(line.substr(6, 7) == ")", "AAAAAA",
255 if(line.substr(7, 8) == ")", "AAAAAAA",
256 if(line.substr(8, 9) == ")", "AAAAAAAA",
257 if(line.substr(9, 10) == ")","AAAAAAAAA",
258 if(line.substr(10, 11) == ")", "AAAAAAAAAA",
259 if(line.substr(11, 12) == ")", "AAAAAAAAAAA",
260 if(line.substr(12, 13) == ")", "AAAAAAAAAAAA",
261 if(line.substr(13, 14) == ")", "AAAAAAAAAAAAA",
262 if(line.substr(14, 15) == ")", "AAAAAAAAAAAAAA",
263 if(line.substr(15, 16) == ")", "AAAAAAAAAAAAAAA",
264 if(line.substr(16, 17) == ")", "AAAAAAAAAAAAAAAA",
265 if(line.substr(17, 18) == ")", "AAAAAAAAAAAAAAAAA",
266 if(line.substr(18, 19) == ")", "AAAAAAAAAAAAAAAAAA",
267 if(line.substr(19, 20) == ")", "AAAAAAAAAAAAAAAAAAA",
268 if(line.substr(20, 21) == ")", "AAAAAAAAAAAAAAAAAAAA",
269 "AAAAAAAAAAAAAAAAAAAAA"
270 ))))))))))))))))))))).len() + 1
271 '';
272
273 "format_short_signature(signature)" = "signature.name()";
274 "format_timestamp(timestamp)" = "timestamp.ago()";
275 "format_short_commit_header(commit)" = ''
276 separate(" ",
277 if(commit.current_working_copy(), label("active_marker", " ACTIVE ")),
278 if(commit.conflict(), label("conflict_marker", " CONFLICT ")),
279 format_short_change_id_with_hidden_and_divergent_info(commit),
280 format_short_signature(commit.author()),
281 label("muted", "|"),
282 if(commit.description().trim().len() > 0, label("muted", format_timestamp(commit_timestamp(commit)))),
283 commit.bookmarks(),
284 commit.tags(),
285 commit.working_copies(),
286 label("muted", "(") ++
287 format_short_commit_id(commit.commit_id()) ++
288 label("muted", ")"),
289 if(config("ui.show-cryptographic-signatures").as_boolean(),
290 format_short_cryptographic_signature(commit.signature())),
291 )
292 '';
196 aliases = {
197 "ab" = [ "abandon" ];
198 # "ai" = [
199 # "util"
200 # "exec"
201 # "--"
202 # "~/jj-ai-sync.sh"
203 # ];
293204 };
294
295205 };
296206 };
297207
298208 ssh = {
299209 enable = true;
210 enableDefaultConfig = false;
300211 extraConfig = ''
212 Include ~/.orbstack/ssh/config*
213
301214 SetEnv TERM=xterm-256color
302215 '';
303216 matchBlocks = rec {
217 "*" = { };
304218 zenith = {
305219 user = "clo";
306 port = 222;
220 port = 22;
221 };
222 "git.paperclover.net" = zenith;
223 "paperclover.net" = {
224 user = "clo";
225 port = 22;
307226 };
308 "nas.paperclover.net" = zenith;
309227 };
310228 };
311229 };
users/clover/paperback/home.nix-1
......@@ -12,7 +12,6 @@
1212 };
1313 home.packages = with pkgs; [
1414 deno
15 nodejs_22
1615 rustup
1716 typescript
1817 pm2
users/clover/work/home.nix+1-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";
......@@ -18,7 +19,6 @@
1819 }))
1920 doppler
2021 deno
21 nodejs_24
2222 rustup
2323 typescript
2424 ssm-session-manager-plugin