From fcb6a5b05f029c6befac66fe0956bf51dda41de6 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sun, 18 Apr 2021 09:45:49 +0200 Subject: [PATCH] working on hledger --- configs/workhorse/mail-fetcher.nix | 3 ++- system/desktop/packages.nix | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/configs/workhorse/mail-fetcher.nix b/configs/workhorse/mail-fetcher.nix index ca7ec0a..c38c553 100644 --- a/configs/workhorse/mail-fetcher.nix +++ b/configs/workhorse/mail-fetcher.nix @@ -44,7 +44,8 @@ let tags = [ "+junk" "-unread" "-inbox" ]; } { - query = "from:space-left.org OR to:space-left.org OR subject:/\[space-left\]/"; + query = + "from:space-left.org OR to:space-left.org OR subject:/[space-left]/"; tags = [ "+spaceleft" "+list" "+space-left" ]; } { diff --git a/system/desktop/packages.nix b/system/desktop/packages.nix index 534c7d3..d7f4964 100644 --- a/system/desktop/packages.nix +++ b/system/desktop/packages.nix @@ -106,12 +106,18 @@ let borrow = pkgs.writers.writeDashBin "borrow" # sh '' - ${pkgs.hledger-ui}/bin/hledger-ui -f ~/finance/hledger-borrow "$@" + TERM=xterm-mono ${pkgs.hledger-ui}/bin/hledger-ui --file ~/finance/hledger-borrow "$@" ''; bank = pkgs.writers.writeDashBin "bank" # sh '' - ${pkgs.hledger-ui}/bin/hledger-ui -f ~/finance/hledger-bank "$@" + TERM=xterm-mono ${pkgs.hledger-ui}/bin/hledger-ui --file ~/finance/hledger/`date +%Y`.journal "$@" + ''; + + bank-old = year: + pkgs.writers.writeDashBin "bank-${year}" # sh + '' + TERM=xterm-mono ${pkgs.hledger-ui}/bin/hledger-ui --file ~/finance/hledger/${year}.journal "$@" ''; irc = pkgs.writers.writeDashBin "irc" # sh @@ -164,7 +170,6 @@ in { in [ uget - #zettlr #(library.desktopFile zettlr { longName = "Zettlr"; }) joplin @@ -193,6 +198,9 @@ in { }) bank + (bank-old "2021") + (bank-old "2020") + (bank-old "2019") borrow irc