configurable max website length

This commit is contained in:
Lewis Wynne 2026-04-09 14:50:51 +01:00
parent 81d44da41c
commit 0a827492c0
3 changed files with 21 additions and 2 deletions

View file

@ -63,6 +63,12 @@ in
description = "Maximum length for messages. 0 for unlimited.";
};
maxWebsiteLength = mkOption {
type = types.int;
default = 100;
description = "Maximum length for website URLs. 0 for unlimited.";
};
user = mkOption {
type = types.str;
default = "guestbook";
@ -101,6 +107,7 @@ in
BOOK_HONEYPOT = if cfg.honeypot then "true" else "false";
BOOK_MAX_NAME_LENGTH = toString cfg.maxNameLength;
BOOK_MAX_MESSAGE_LENGTH = toString cfg.maxMessageLength;
BOOK_MAX_WEBSITE_LENGTH = toString cfg.maxWebsiteLength;
};
serviceConfig = {
Type = "simple";