From d3ed407d335d3faed952ab3fb1232550c9bca4fd Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 29 Dec 2023 08:52:27 +0100 Subject: feat(hm/conf/git): Use the previous commit's scope when committing --- hm/soispha/conf/git/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'hm/soispha/conf/git/default.nix') diff --git a/hm/soispha/conf/git/default.nix b/hm/soispha/conf/git/default.nix index 46f272eb..eda42210 100644 --- a/hm/soispha/conf/git/default.nix +++ b/hm/soispha/conf/git/default.nix @@ -2,16 +2,26 @@ nixosConfig, lib, config, + sysLib, + pkgs, ... }: let gitIgnoreFile = ./git_ignore.git; gitTemplateFile = ./git_template.git; + commit = sysLib.writeShellScriptWithLibraryAndKeepPath { + name = "commit"; + src = ./scripts/commit; + dependencies = with pkgs; [ + git + gnused + ]; + }; in { programs.git = { enable = true; #package = pkgs.gitAndTools.gitFull; # TODO: for git send-email support aliases = { - cm = "commit --verbose"; + cm = "!${commit}/bin/commit"; cmr = "commit --file .git/COMMIT_EDITMSG --edit --verbose"; st = "status"; -- cgit 1.4.1