86 lines
No EOL
2.1 KiB
Nix
86 lines
No EOL
2.1 KiB
Nix
{ inputs, ... }:
|
|
{
|
|
flake.modules.nixos.mailserver =
|
|
{ config, ... }:
|
|
{
|
|
|
|
imports = [
|
|
inputs.nixos-mailserver.nixosModules.mailserver
|
|
];
|
|
|
|
|
|
age.secrets = {
|
|
email-aquapass = {
|
|
file = ../../../secrets/email-aqua.age;
|
|
};
|
|
email-ntfypass = {
|
|
file = ../../../secrets/email-ntfy.age;
|
|
};
|
|
email-cert = {
|
|
file = ../../../secrets/email-cert.age;
|
|
};
|
|
email-key = {
|
|
file = ../../../secrets/email-key.age;
|
|
};
|
|
};
|
|
|
|
mailserver = {
|
|
enable = true;
|
|
stateVersion = 3;
|
|
fqdn = "mail.aquaticservers.com";
|
|
domains = [ "aquaticservers.com" ];
|
|
openFirewall = true;
|
|
|
|
enableImap = true;
|
|
enableImapSsl = true;
|
|
enablePop3 = false;
|
|
enablePop3Ssl = false;
|
|
enableSubmission = true;
|
|
enableSubmissionSsl = true;
|
|
|
|
|
|
# A list of all login accounts. To create the password hashes, use
|
|
# nix-shell -p mkpasswd --run 'mkpasswd -s'
|
|
accounts = {
|
|
"aqua@aquaticservers.com" = {
|
|
hashedPasswordFile = "${config.age.secrets.email-aquapass.path}";
|
|
aliases = [ "@aquaticservers.com" ];
|
|
};
|
|
"notify@aquaticservers.com" = {
|
|
hashedPasswordFile = "${config.age.secrets.email-ntfypass.path}";
|
|
aliases = [ "@aquaticservers.com" ];
|
|
};
|
|
};
|
|
|
|
mailboxes = {
|
|
Drafts = {
|
|
auto = "subscribe";
|
|
special_use = "\\Drafts";
|
|
};
|
|
Sent = {
|
|
auto = "subscribe";
|
|
special_use = "\\Sent";
|
|
};
|
|
Junk = {
|
|
auto = "subscribe";
|
|
fts_autoindex = false;
|
|
special_use = "\\Junk";
|
|
};
|
|
Archive = {
|
|
auto = "subscribe";
|
|
special_use = "\\Archive";
|
|
};
|
|
Trash = {
|
|
auto = "no";
|
|
fts_autoindex = false;
|
|
special_use = "\\Trash";
|
|
};
|
|
};
|
|
|
|
x509 = {
|
|
certificateFile = "/etc/letsencrypt/live/aquaticservers.com-0001/fullchain.pem";
|
|
privateKeyFile = "/etc/letsencrypt/live/aquaticservers.com-0001/privkey.pem";
|
|
};
|
|
};
|
|
};
|
|
} |