this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 141 lines 3.4 kB view raw
1{ 2 delib, 3 lib, 4 pkgs, 5 ... 6}: 7delib.module { 8 name = "programs.git"; 9 10 home.always = {myconfig, ...}: let 11 inherit (myconfig.constants) userfullname useremail; 12 in { 13 xdg.configFile."git/allowed_signers".source = ../../files/git/allowed_signers; 14 15 home.packages = [pkgs.jjui]; 16 17 programs.git = { 18 enable = true; 19 20 signing = { 21 signByDefault = true; 22 format = "ssh"; 23 key = "~/.ssh/id_ed25519_sk_rk"; 24 }; 25 26 settings = { 27 user = { 28 name = userfullname; 29 email = useremail; 30 }; 31 32 # TODO: custom pretty stuff? 33 blame.showEmail = true; 34 init.defaultBranch = "main"; 35 pull.rebase = true; 36 37 log = { 38 abbrevCommit = true; 39 # TODO: `git log --oneline` looks silly with this. Need custom format. 40 showSignature = true; 41 # TODO: trial for a while and see if I like this. 42 date = "human"; 43 }; 44 45 merge = { 46 # Try to avoid merge commits 47 ff = "only"; 48 # Really only useful on a well-managed team. Maybe eventually. 49 # verifySignatures = true; 50 conflictStyle = "diff3"; 51 }; 52 53 push = { 54 autoSetupRemote = true; 55 followTags = true; 56 }; 57 58 # Require explicit `drop` in interactive rebase 59 rebase.missingCommitsCheck = "error"; 60 rerere.enabled = true; 61 62 status = { 63 relativePaths = false; 64 showStash = true; 65 }; 66 67 gpg.ssh.allowedSignersFile = "~/.config/git/allowed_signers"; 68 # "gpg.ssh.program = "gfh-keygen"; 69 # "gpg.ssh.defaultKeyCommand = "gfh"; 70 }; 71 }; 72 73 programs.gh = { 74 enable = true; 75 settings = { 76 git_protocol = "ssh"; 77 aliases = { 78 clone = "repo clone"; 79 }; 80 }; 81 }; 82 83 programs.jujutsu = { 84 enable = true; 85 settings = { 86 user = { 87 name = userfullname; 88 email = useremail; 89 }; 90 91 ui = { 92 default-command = "log"; 93 show-cryptographic-signatures = true; 94 conflict-marker-style = "git"; 95 # diff-formatter = "delta"; 96 editor = "codium -w"; 97 merge-editor = lib.mkForce "vscodium"; 98 }; 99 100 revset-aliases = { 101 "closest_bookmark(to)" = "heads(::to & bookmarks())"; 102 "p(n)" = "p(@, n)"; 103 "p(r, n)" = "roots(r | ancestors(r-, n))"; 104 "tail()" = "tail(@)"; 105 "tail(h)" = "roots(trunk()..h)"; 106 }; 107 108 aliases = { 109 a = ["abandon"]; 110 e = ["edit"]; 111 n = ["new"]; 112 tug = ["bookmark" "move" "--from" "closest_bookmark(@-)" "--to" "@-"]; 113 tug-here = ["bookmark" "move" "--from" "closest_bookmark(@)" "--to" "@"]; 114 solve = ["resolve" "--tool" "mergiraf"]; 115 }; 116 117 git = { 118 sign-on-push = true; 119 write-change-id-header = true; 120 }; 121 122 signing = { 123 behavior = "drop"; 124 backend = "ssh"; 125 key = "~/.ssh/id_ed25519_sk_rk.pub"; 126 backends.ssh.allowed-signers = "~/.config/git/allowed_signers"; 127 }; 128 129 remotes.origin.auto-track-bookmarks = "glob:*"; 130 }; 131 }; 132 133 programs.delta = { 134 enable = true; 135 enableGitIntegration = true; 136 enableJujutsuIntegration = true; 137 }; 138 139 programs.mergiraf.enable = true; 140 }; 141}