From fe6b177c3dd25e0d7181a28d34c3ad673d8bba87 Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Fri, 31 Dec 2021 16:07:46 +0200 Subject: [PATCH] Support for max-upload-size --- modules/gitit/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/gitit/default.nix b/modules/gitit/default.nix index ff35e03..0149c08 100644 --- a/modules/gitit/default.nix +++ b/modules/gitit/default.nix @@ -22,6 +22,7 @@ let disable-registration: ${yesNo disable-registration} access-question: ${access-question} access-question-answers: ${access-question-answers} + max-upload-size: ${toString max-upload-size}K ''; in @@ -49,6 +50,17 @@ in default = "Wiki"; description = "The title of the wiki."; }; + max-upload-size = mkOption { + type = lib.types.int; + default = 100; + description = '' + specifies an upper limit on the size (in kilobytes) of files uploaded + through the wiki's web interface. + To disable uploads, set this to 0. + This will result in the uploads link disappearing + and the _upload url becoming inactive. + ''; + }; access-question = mkOption { type = lib.types.str; default = "";