diff --git a/modules/home-manager/cli/git.nix b/modules/home-manager/cli/git.nix index 765f366a..12c8fafe 100644 --- a/modules/home-manager/cli/git.nix +++ b/modules/home-manager/cli/git.nix @@ -170,6 +170,7 @@ in home = { packages = with pkgs; [ git-extras + git-graph git-trim stable.git-instafix ]; diff --git a/packages/default.nix b/packages/default.nix index c9ee6d47..adfc90d6 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -12,6 +12,7 @@ in create-script = callPackage ./create-script.nix { }; dev-commit = callPackage ./dev-commit.nix { }; displayselect = callPackage ./displayselect { }; + git-graph = callPackage ./git-graph.nix { }; mounter = callPackage ./mounter.nix { }; move-firefox-screenshots = callPackage ./move-firefox-screenshots.nix { }; notes = callPackage ./notes { }; diff --git a/packages/git-graph.nix b/packages/git-graph.nix new file mode 100644 index 00000000..4e719bc5 --- /dev/null +++ b/packages/git-graph.nix @@ -0,0 +1,17 @@ +{ pkgs }: + +pkgs.writeShellApplication { + name = "git-graph"; + + runtimeInputs = with pkgs; [ git ]; + + text = '' + # Based on https://github.com/sdaschner/dotfiles/blob/master/bin/git-graph. + + git log \ + --abbrev-commit \ + --all \ + --graph \ + --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%ae>%Creset" + ''; +}