add option to add extra args to hledger

This commit is contained in:
ibizaman 2025-02-09 17:28:31 +01:00 committed by Pierre Penninckx
parent 82426a4f1f
commit 5a6be171b3
2 changed files with 11 additions and 5 deletions

View file

@ -16,6 +16,10 @@ Template:
# Upcoming Release
## New Features
- Add option to add extra args to hledger command.
# v0.2.10
## New Features

View file

@ -69,6 +69,12 @@ in
};
};
};
extraArguments = lib.mkOption {
description = "Extra arguments append to the hledger command.";
default = ["--forecast"];
type = lib.types.listOf lib.types.str;
};
};
config = lib.mkIf cfg.enable {
@ -84,11 +90,7 @@ in
port = cfg.port;
allow = "edit";
extraOptions = [
# https://hledger.org/1.30/hledger-web.html
# "--capabilities-header=HLEDGER-CAP"
"--forecast"
];
extraOptions = cfg.extraArguments;
};
systemd.services.hledger-web = {