From 359ec0c943b3475c3f52658bf5e475b40a41ae13 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 20 Jan 2024 11:34:58 -0800 Subject: [PATCH] Add smtp port, and mount admin passwd file vol --- lemmy-container.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lemmy-container.nix b/lemmy-container.nix index 3f56a90..168adac 100644 --- a/lemmy-container.nix +++ b/lemmy-container.nix @@ -24,6 +24,7 @@ let volumes = [ "postgres-data:/var/lib/postgres/data" "pictrs-data:/var/lib/pict-rs" + "${cfg.admin-password-file}:${cfg.admin-password-file}" ]; ports = "${toString cfg.port}:80"; networks = [ "internal_network" "internal_network" ]; @@ -43,7 +44,8 @@ let nginx.enable = true; settings = { email = { - smtp_server = cfg.smtp.server; + smtp_server = cfg.smtp.host; + smtp_port = cfg.smtp.port; smtp_from_address = "noreply@${cfg.hostname}"; }; hostname = cfg.hostname; @@ -92,6 +94,19 @@ in { type = str; 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 {