From 21271d1b82d95b9b79c8f9d2fcae73c4200c5818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sun, 7 Jul 2019 10:48:16 +0200 Subject: [PATCH] hledger: add hledger-git entry --- modules/hledger.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/hledger.nix b/modules/hledger.nix index 1121977..568f049 100644 --- a/modules/hledger.nix +++ b/modules/hledger.nix @@ -3,7 +3,12 @@ with lib; let cfg = config.niveum.hledger; hledger-git = pkgs.writers.writeDashBin "hledger-git" '' - ${pkgs.git}/bin/git -C $(dirname $LEDGER_FILE) $* + GIT="${pkgs.git}/bin/git -C $(dirname $LEDGER_FILE)" + if [ "$1" = entry ]; then + $GIT commit --all --message="$(date +%F)" + else + $GIT $* + fi ''; in { options.niveum.hledger = {