grace/dots

dotfiles/nix configs

git clone https://git.gae.moe/grace/dots

Grace Yoderhx and vcs changesddf0c79

vulcan
1.7 KiB91 linesraw
1{ ... }:
2
3{
4  programs = {
5    git = {
6      enable = true;
7      ignores = [ ".DS_Store" ];
8    };
9
10    jujutsu = {
11      enable = true;
12      settings = {
13        user = {
14          name = "Grace Yoder";
15          email = "grace_yoder@outlook.com";
16        };
17        signing = {
18          behavior = "own";
19          backend = "ssh";
20          key = "~/.ssh/id_ed25519";
21        };
22        remotes.origin.auto-track-bookmarks = "*";
23        remotes.github.auto-track-bookmarks = "*";
24        aliases = {
25          tug = [
26            "bookmark"
27            "advance"
28            "--to"
29            "coalesce(@ ~ empty(), @-)"
30          ];
31
32          fn = [
33            "util"
34            "exec"
35            "--"
36            "bash"
37            "-c"
38            ''
39              set -euo pipefail
40
41              cd "$JJ_WORKSPACE_ROOT"
42              bookmark="''${1:-main}"
43              jj git fetch
44              jj new "$bookmark"
45            ''
46            ""
47          ];
48
49          tcp = [
50            "util"
51            "exec"
52            "--"
53            "bash"
54            "-c"
55            ''
56              set -euo pipefail
57
58              cd "$JJ_WORKSPACE_ROOT"
59              jj tug
60              if [ "$#" -eq 0 ]; then
61                jj new
62              else
63                jj commit -m "$*"
64              fi
65              jj git push
66            ''
67            ""
68          ];
69
70          sp = [
71            "util"
72            "exec"
73            "--"
74            "bash"
75            "-c"
76            ''
77              set -euo pipefail
78
79              cd "$JJ_WORKSPACE_ROOT"
80              jj squash --ignore-immutable
81              jj git push
82            ''
83            ""
84          ];
85        };
86      };
87    };
88
89    gh.enable = true;
90  };
91}