1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00
home-manager/tests/modules/programs/ledger/ledger.nix
2023-05-11 11:20:49 +02:00

35 lines
714 B
Nix

{ ... }:
{
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
''}
'';
}