1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-24 20:19:45 +01:00
home-manager/tests/modules/programs/ledger/ledger.nix

36 lines
714 B
Nix
Raw Normal View History

{ ... }:
{
programs.ledger = {
enable = true;
settings = {
sort = "date";
strict = true;
pedantic = true;
leeway = 30;
date-format = "%Y-%m-%d";
file = [
"~/finances/journal.ledger"
"~/finances/assets.ledger"
"~/finances/income.ledger"
];
};
};
test.stubs.ledger = { };
nmt.script = ''
assertFileContent home-files/.config/ledger/ledgerrc \
${builtins.toFile "ledger-expected-settings" ''
--date-format %Y-%m-%d
--file ~/finances/journal.ledger
--file ~/finances/assets.ledger
--file ~/finances/income.ledger
--leeway 30
--pedantic
--sort date
--strict
''}
'';
}