Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201{ pkgs, inputs, config, lib, ...}:{ programs.gh = { enable = true;
extensions = with pkgs; [ gh-dash gh-eco gh-stack ];
settings.aliases.co = "pr checkout"; settings.aliases.patch = "!patch2pr"; settings.version = "1"; };
# manual.manpages.enable = true;
home.packages = [ # pkgs.git-branchless pkgs.git-gone pkgs.git-cliff # pkgs.git-revise # pkgs.gitAndTools.git-imerge pkgs.prr # inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.prr pkgs.hut inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.imbox # pkgs.radicle-node ];
programs.diff-so-fancy = { enable = true; enableGitIntegration = true; };
programs.git = { enable = true;
lfs.enable = true;
attributes = [ "*.ex diff=elixir" "*.exs diff=elixir" "mix.lock merge=binary"
"*.erl diff=erlang" "*.hrl diff=erlang" "rebar.lock merge=binary"
"*.tex diff=tex"
"*.rs diff=rust" "Cargo.lock merge=binary"
"*.css diff=css"
"*.md diff=markdown"
"flake.lock merge=binary"
"yarn.lock merge=binary"
"*.lockb diff=lockb" ];
ignores = inputs.self.lib.readFileWithComments ./git/ignore;
settings = { alias = { b = "branch"; ca = "commit --amend"; ci = "commit"; co = "checkout"; rci = "commit --amend --reuse-message HEAD";
lg = "log --color --graph --abbrev-commit --pretty=simple-oneline";
squash = "!git rebase -i \"$(git merge-base HEAD \"$(git default-branch)\")\"";
st = "status -sb"; todo = "grep -Ee '\\\\bTODO:?\\\\b'"; fixme = "grep -Ee '\\\\bFIX(ME)?:?\\\\b'";
default-branch = "!git symbolic-ref --short refs/remotes/origin/HEAD | sed 's|^origin/||'";
cleanup = "!git branch --format=\"%(if:notequals=*)%(HEAD)%(then)%(if:notequals=\${1:-$(git default-branch)})%(refname:lstrip=2)%(then)%(refname:lstrip=2)%(end)%(end)\" --merged \"\$(git default-branch)\" | xargs -rpxL1 git branch -d"; };
core.commitGraph = true;
init.defaultBranch = "master";
user = { name = "Łukasz Jan Niemier"; useConfigOnly = true; };
merge = { ff = false; conflictstyle = "zdiff3"; };
branch.autoSetupRebase = "always";
signing.format = "ssh";
commit = { gpgSign = true; verbose = true; cleanup = "scissors"; };
diff = { indentHeuristic = true; algorithm = "histogram"; mnemonicPrefix = true; renames = "copies";
tool = "difftastic";
markdown.xfuncname = "^(#+\\s+.*)$";
lockb = { textconv = "${pkgs.bun}/bin/bun"; binary = true; }; };
difftool = { prompt = false;
difftastic.cmd = "${pkgs.difftastic}/bin/difft \"$LOCAL\" \"$REMOTE\""; };
pager.difftool = true;
fetch.prune = true;
tag = { forceSignAnnotated = true; sort = "version:refname"; };
versionsort.suffix = [ "" "-rc" "-pre" ];
push = { default = "simple"; autoSetupRemote = true; followTags = true; gpgSign = "if-asked"; };
pull = { rebase = true; twohead = "ort"; };
rebase = { autostash = true; autosquash = true; updateRefs = true; };
url."git@github.com:".pushInsteadOf = [ "https://github.com/" "git://github.com/" ];
sendemail = lib.mkIf config.programs.msmtp.enable { smtpserver = "${config.programs.msmtp.package}/bin/msmtp"; bcc = config.accounts.email.accounts.hauleth.address; annotate = true; };
maintenance = { # It will ask 1password for access to SSH key/GH token. That is # irritating prefetch.enabled = false; };
pretty = { simple-oneline = "%C(yellow)%h%C(auto)%d %s [%C(green)%aN <%aE>%C(reset)] (%C(blue)%ar%C(reset))"; simple-oneline-sign = "%C(yellow)%h%C(auto)%d %s [%C(green)%aN <%aE>%C(reset)] (%C(blue)%ar%C(reset)) %G?"; };
branchless."revsets.alias".work = "heads(draft())"; }; };}