From 329d92467415b5f6842d14695aef661d7635034d Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 22 Apr 2021 08:32:14 +0200 Subject: [PATCH] add ledger command --- system/desktop/packages.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system/desktop/packages.nix b/system/desktop/packages.nix index db53c7e..941778c 100644 --- a/system/desktop/packages.nix +++ b/system/desktop/packages.nix @@ -109,6 +109,12 @@ let TERM=xterm-mono ${pkgs.hledger-ui}/bin/hledger-ui --file ~/finance/.hledger-borrow "$@" ''; + bank-report = pkgs.writers.writeDashBin "bank-report" # sh + '' + ${pkgs.hledger}/bin/hledger --file ~/finance/hledger/all.journal balance -M -B date:$(date +%Y-%m -d 'last year').. + ${pkgs.hledger}/bin/hledger --file ~/finance/hledger/all.journal balance -M -B date:$(date +%Y-%m -d 'last year').. --depth 1 + ''; + bank = pkgs.writers.writeDashBin "bank" # sh '' ${pkgs.hledger-ui}/bin/hledger-ui --file ~/finance/hledger/all.journal @@ -211,6 +217,7 @@ in { borrow bank + bank-report (bank-old "2021") (bank-old "2020")