mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 11:33:17 +00:00
36 lines
714 B
Nix
36 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
|
||
|
''}
|
||
|
'';
|
||
|
}
|