git scripts

This commit is contained in:
Miguel Palhas
2024-10-06 14:36:09 +01:00
parent 1585865544
commit a436a816b6
14 changed files with 181 additions and 456 deletions
+29 -11
View File
@@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
xdg.configFile."git/commit-message.txt".source = ./commit-message.txt;
xdg.configFile."git/ignore".source = ./ignore;
@@ -7,10 +8,8 @@
userName = "Miguel Palhas";
userEmail = "mpalhas@gmail.com";
aliases = {
ls =
"log --color --graph --oneline --decorate --topo-order --pretty=format:'%C(yellow)%d%Creset %Cgreen(%cr)%Creset %C(bold blue)[%an]%Creset %s %Cred(%h)%Creset' --abbrev-commit";
ll = ''
log --reverse --pretty=format:"%C(yellow)%h%Cred%d\ %Creset%s%Cblue\ [%an]" --decorate --numstat'';
ls = "log --color --graph --oneline --decorate --topo-order --pretty=format:'%C(yellow)%d%Creset %Cgreen(%cr)%Creset %C(bold blue)[%an]%Creset %s %Cred(%h)%Creset' --abbrev-commit";
ll = ''log --reverse --pretty=format:"%C(yellow)%h%Cred%d\ %Creset%s%Cblue\ [%an]" --decorate --numstat'';
conf = "diff --name-only --diff-filter=U";
ba = "branch -a";
pb = "publish";
@@ -34,14 +33,33 @@
editor = "nvim";
pager = "delta";
};
commit = { template = "~/.config/git/commit-message.txt"; };
push = { default = "upstream"; };
delta = { navigate = true; };
"diff \"image\"" = { textconv = "mediainfo"; };
"diff \"text\"" = { textconv = "fold -s -w80"; };
commit = {
template = "~/.config/git/commit-message.txt";
};
push = {
default = "upstream";
};
delta = {
navigate = true;
};
"diff \"image\"" = {
textconv = "mediainfo";
};
"diff \"text\"" = {
textconv = "fold -s -w80";
};
};
};
home.packages = with pkgs; [ delta mediainfo ];
home.packages = with pkgs; [
delta
mediainfo
];
home.sessionPath = [
"$HOME/.config/git/scripts"
];
xdg.configFile = {
"git/scripts".source = ./scripts;
};
programs.gh.enable = true;
}