Add mail options
This commit is contained in:
parent
6a2521a326
commit
9c7c514c65
1 changed files with 35 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ let
|
|||
];
|
||||
};
|
||||
staticRoot = pkgs.pretix-static;
|
||||
environmentFile = pkgs.runCommand "pretix-environ" runCommandArgs ''
|
||||
environmentFile = pkgs.runCommand "pretix-environ" runCommandArgs (''
|
||||
cat > $out <<EOF
|
||||
DATA_DIR = /var/pretix
|
||||
DJANGO_SETTINGS_MODULE=pretix_wrapper.settings
|
||||
|
|
@ -50,9 +50,18 @@ let
|
|||
PRETIX_REDIS_LOCATION=redis://127.0.0.1:${toString redisPort}/0
|
||||
PRETIX_REDIS_SESSIONS=true
|
||||
PRETIX_STATIC_ROOT=${staticRoot}
|
||||
'' + (
|
||||
if cfg.mail.enable then
|
||||
''
|
||||
PRETIX_MAIL_FROM=${toString cfg.mail.from}
|
||||
PRETIX_MAIL_HOST="${cfg.mail.host}"
|
||||
PRETIX_MAIL_PORT=${toString cfg.mail.port}
|
||||
'' else ""
|
||||
) +
|
||||
''
|
||||
PYTHONPATH=$PYTHONPATH
|
||||
EOF
|
||||
'';
|
||||
'');
|
||||
mkTimer = { description, unit, onCalendar }: {
|
||||
inherit description;
|
||||
requires = [ "pretix-migrate.service" ];
|
||||
|
|
@ -97,6 +106,30 @@ in
|
|||
type = types.path;
|
||||
description = "Path to the sops secrets file which stores pretix.cfg settings.";
|
||||
};
|
||||
mail = {
|
||||
enable = mkEnableOption "Enables or disables emailing.";
|
||||
from = mkOption {
|
||||
type = types.str;
|
||||
description = "The email address to set as From header in outgoing emails by the system.";
|
||||
};
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
description = "The SMTP Host to connect to.";
|
||||
default = "localhost";
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
description = "The SMTP Port to connect to.";
|
||||
default = 25;
|
||||
};
|
||||
admins = mkOption {
|
||||
type = listOf str;
|
||||
description = ''
|
||||
Comma-separated list of email addresses that should receive a report about every error code 500 thrown by pretix.
|
||||
'';
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
banktool = {
|
||||
enable = mkEnableOption "Enable tool to query bank account and sync transaction data to pretix server.";
|
||||
days = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue