parent
7fee13eb4c
commit
8c297e1816
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -158,6 +158,8 @@ Makefile @thiagokokada
|
||||||
|
|
||||||
/modules/programs/lazygit.nix @kalhauge
|
/modules/programs/lazygit.nix @kalhauge
|
||||||
|
|
||||||
|
/modules/programs/ledger.nix @marsam
|
||||||
|
|
||||||
/modules/programs/less.nix @pamplemousse
|
/modules/programs/less.nix @pamplemousse
|
||||||
/tests/modules/programs/less @pamplemousse
|
/tests/modules/programs/less @pamplemousse
|
||||||
|
|
||||||
|
|
|
@ -726,6 +726,13 @@ in
|
||||||
A new module is available: 'programs.pls'.
|
A new module is available: 'programs.pls'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2022-10-06T23:06:08+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'programs.ledger'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,7 @@ let
|
||||||
./programs/kitty.nix
|
./programs/kitty.nix
|
||||||
./programs/kodi.nix
|
./programs/kodi.nix
|
||||||
./programs/lazygit.nix
|
./programs/lazygit.nix
|
||||||
|
./programs/ledger.nix
|
||||||
./programs/less.nix
|
./programs/less.nix
|
||||||
./programs/lesspipe.nix
|
./programs/lesspipe.nix
|
||||||
./programs/lf.nix
|
./programs/lf.nix
|
||||||
|
|
39
modules/programs/ledger.nix
Normal file
39
modules/programs/ledger.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.ledger;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ maintainers.marsam ];
|
||||||
|
|
||||||
|
options.programs.ledger = {
|
||||||
|
enable = mkEnableOption "ledger, a double-entry accounting system";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "ledger" { };
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = literalExpression ''
|
||||||
|
--sort date
|
||||||
|
--effective
|
||||||
|
--date-format %Y-%m-%d
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration written to <filename>$XDG_CONFIG_HOME/ledger/ledgerrc</filename>.
|
||||||
|
See <link xlink:href="https://www.ledger-cli.org/3.0/doc/ledger3.html#Detailed-Option-Description"/>
|
||||||
|
for explanation about possible values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
xdg.configFile."ledger/ledgerrc" =
|
||||||
|
mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; };
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue