Skip to content

Commit

Permalink
add option to add extra args to hledger
Browse files Browse the repository at this point in the history
  • Loading branch information
ibizaman authored and ibizaman committed Feb 9, 2025
1 parent 82426a4 commit 5a6be17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Template:

# Upcoming Release

## New Features

- Add option to add extra args to hledger command.

# v0.2.10

## New Features
Expand Down
12 changes: 7 additions & 5 deletions modules/services/hledger.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 = {
Expand Down

0 comments on commit 5a6be17

Please sign in to comment.