nix: add log_format option to the module

This commit is contained in:
raf 2025-05-02 13:03:54 +03:00
commit da01f1fd33
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -8,7 +8,7 @@ self: {
inherit (builtins) toJSON toString;
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) package str port int listOf enum bool attrsOf path;
inherit (lib.types) package str int listOf enum bool attrsOf path;
inherit (lib.lists) optionals;
cfg = config.services.eris;
@ -30,6 +30,7 @@ self: {
config_dir = "${cfg.stateDir}/conf";
cache_dir = cfg.cacheDir;
disable_metrics = cfg.disableMetrics;
log_format = cfg.logFormat;
});
in {
###### interface
@ -134,6 +135,12 @@ in {
description = "Logging level for the Eris service.";
};
logFormat = mkOption {
type = enum ["Plain" "Pretty" "Json" "PrettyJson"];
default = "Pretty";
description = "Logging format for Eris.";
};
user = mkOption {
type = str;
default = "eris";