aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/by-name/hl/lhedger/module.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/by-name/hl/lhedger/module.nix b/modules/by-name/hl/lhedger/module.nix
index 00c7d815..68de85d0 100644
--- a/modules/by-name/hl/lhedger/module.nix
+++ b/modules/by-name/hl/lhedger/module.nix
@@ -15,6 +15,7 @@
...
}: let
cfg = config.soispha.hledger;
+ ledgerFile = "${config.home-manager.users.soispha.xdg.dataHome}/hledger/2025.journal";
in {
options.soispha.hledger = {
enable = libraries.base.options.mkEnable "hledger";
@@ -22,12 +23,22 @@ in {
config = lib.mkIf cfg.enable {
environment.variables = {
- LEDGER_FILE = "${config.home-manager.users.soispha.xdg.dataHome}/hledger/2025.journal";
+ LEDGER_FILE = ledgerFile;
};
home-manager.users.soispha = {
home.packages = [
pkgs.hledger
+
+ (pkgs.writeShellApplication {
+ name = "hledger-edit";
+
+ text = ''
+ "$EDITOR" ${lib.strings.escapeShellArg ledgerFile}
+ '';
+
+ inheritPath = true; # needs access to nvim
+ })
];
xdg.configFile = {