feat: set qa email to jet@extremist.software
This commit is contained in:
parent
51bbf67bbe
commit
2e9b32a8fd
1 changed files with 8 additions and 7 deletions
15
module.nix
15
module.nix
|
|
@ -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)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue