From da01f1fd33133a47e34e4dfe14ea849ce4dc4880 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 2 May 2025 13:03:54 +0300 Subject: [PATCH] nix: add `log_format` option to the module --- nix/module.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/module.nix b/nix/module.nix index 75adc4f..742f739 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -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";