mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01: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
|
||
|
''}
|
||
|
'';
|
||
|
}
|