From f52447f7d2b3e7894c18453d34db71f1b546030d Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Thu, 15 Apr 2021 22:59:56 +0200 Subject: [PATCH] nix: add an option for toggling DEBUG --- nix/module.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/module.nix b/nix/module.nix index e618cd9a3..83e8598a7 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -13,7 +13,7 @@ let else "redis://${cfg.celeryRedis.host}:${toString cfg.celeryRedis.port}/0"; env = { - DEBUG = "false"; + DEBUG = if cfg.debug then "true" else "false"; DOMAIN = cfg.domain; BOOKWYRM_DATABASE_BACKEND = "postgres"; MEDIA_ROOT = (builtins.toPath cfg.stateDir) + "/images"; @@ -121,6 +121,13 @@ in description = '' List of hosts to allow, checked against the Host: header. Leave empty to accept all hosts. + + debug = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable debug mode. Debug mode should not be used in + production, but provides more verbose logging. ''; };