This commit is contained in:
Jet 2026-03-18 17:36:26 -07:00
parent 51bbf67bbe
commit 2e9b32a8fd
No known key found for this signature in database

View file

@ -18,10 +18,10 @@ in
tor.enable = lib.mkEnableOption "Tor hidden service for the website"; tor.enable = lib.mkEnableOption "Tor hidden service for the website";
envFile = lib.mkOption { qaNotifyEmail = lib.mkOption {
type = lib.types.nullOr lib.types.path; type = lib.types.str;
default = null; default = "jet@extremist.software";
description = "Environment file containing QA_NOTIFY_EMAIL."; description = "Email address to receive Q&A notifications.";
}; };
qaMailDomain = lib.mkOption { qaMailDomain = lib.mkOption {
@ -95,12 +95,13 @@ in
serviceConfig = { serviceConfig = {
DynamicUser = true; DynamicUser = true;
StateDirectory = "jetpham-qa"; StateDirectory = "jetpham-qa";
Environment = [ "QA_DB_PATH=/var/lib/jetpham-qa/qa.db" ]; Environment = [
"QA_DB_PATH=/var/lib/jetpham-qa/qa.db"
"QA_NOTIFY_EMAIL=${cfg.qaNotifyEmail}"
];
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
LoadCredential = "webhook-secret:${config.age.secrets.webhook-secret.path}"; LoadCredential = "webhook-secret:${config.age.secrets.webhook-secret.path}";
} // lib.optionalAttrs (cfg.envFile != null) {
EnvironmentFile = cfg.envFile;
}; };
script = '' script = ''
export WEBHOOK_SECRET="$(cat $CREDENTIALS_DIRECTORY/webhook-secret)" export WEBHOOK_SECRET="$(cat $CREDENTIALS_DIRECTORY/webhook-secret)"