Add smtp port, and mount admin passwd file vol
This commit is contained in:
parent
2ab73ed7f0
commit
359ec0c943
|
@ -24,6 +24,7 @@ let
|
||||||
volumes = [
|
volumes = [
|
||||||
"postgres-data:/var/lib/postgres/data"
|
"postgres-data:/var/lib/postgres/data"
|
||||||
"pictrs-data:/var/lib/pict-rs"
|
"pictrs-data:/var/lib/pict-rs"
|
||||||
|
"${cfg.admin-password-file}:${cfg.admin-password-file}"
|
||||||
];
|
];
|
||||||
ports = "${toString cfg.port}:80";
|
ports = "${toString cfg.port}:80";
|
||||||
networks = [ "internal_network" "internal_network" ];
|
networks = [ "internal_network" "internal_network" ];
|
||||||
|
@ -43,7 +44,8 @@ let
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
email = {
|
email = {
|
||||||
smtp_server = cfg.smtp.server;
|
smtp_server = cfg.smtp.host;
|
||||||
|
smtp_port = cfg.smtp.port;
|
||||||
smtp_from_address = "noreply@${cfg.hostname}";
|
smtp_from_address = "noreply@${cfg.hostname}";
|
||||||
};
|
};
|
||||||
hostname = cfg.hostname;
|
hostname = cfg.hostname;
|
||||||
|
@ -92,6 +94,19 @@ in {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Path to a file containing the administrator password.";
|
description = "Path to a file containing the administrator password.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
smtp = {
|
||||||
|
host = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = "SMTP server hostname.";
|
||||||
|
};
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = "SMTP server port.";
|
||||||
|
default = 25;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
Loading…
Reference in New Issue