changes
This commit is contained in:
31
hosts/mail.social-grow.tech/modules/autoconfig.nix
Normal file
31
hosts/mail.social-grow.tech/modules/autoconfig.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
domain = config.networking.domain;
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts."autoconfig.${domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = null;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:1323/";
|
||||
};
|
||||
};
|
||||
|
||||
services.go-autoconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
service_addr = ":1323";
|
||||
domain = domain;
|
||||
imap = {
|
||||
server = "imap.${domain}";
|
||||
port = 993;
|
||||
};
|
||||
smtp = {
|
||||
server = "mail.${domain}";
|
||||
port = 587;
|
||||
starttls = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user