mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 15:11:03 +01:00
jrnl: add module (#7652)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
58320509c5
commit
715ecee451
1 changed files with 36 additions and 0 deletions
36
modules/programs/jrnl.nix
Normal file
36
modules/programs/jrnl.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.programs.jrnl;
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
in
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.programs.jrnl = {
|
||||||
|
enable = mkEnableOption "jrnl";
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "jrnl" { nullable = true; };
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = yamlFormat.type;
|
||||||
|
default = { };
|
||||||
|
description = ''
|
||||||
|
Configuration for the jrnl binary.
|
||||||
|
Available configuration options are described in the jrnl documentation:
|
||||||
|
<https://jrnl.sh/en/stable/reference-config-file/>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = mkIf (cfg.package != null) [ cfg.package ];
|
||||||
|
xdg.configFile."jrnl/jrnl.yaml".source = yamlFormat.generate "jrnl.yaml" cfg.settings;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.maintainers = [ lib.maintainers.matthiasbeyer ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue