nixos/machines/Ophanim/options.nix
derped 7d70e000ce Add alias to mail accounts.
Automatically add fqdn as mail alias.
2019-08-28 00:33:00 +02:00

70 lines
1.6 KiB
Nix

{ lib, ... }:
with lib;
{
imports = [
../../options/machine.nix
../../options/mailman3/options.nix
];
config.machine = rec {
hostName = "Ophanim";
administrators = [ { name = "derped"; id = 1337; } ];
mailAccounts = [ { name = "derped"; aliases = [ "postmaster" ]; } { name = "mailman3"; aliases = []; } ];
domain = "ophanim.de";
allowUnfree = true;
conffiles = [
"etcvars"
"security"
"zsh"
];
pkgs = [
"base"
"server"
];
services = [
"fail2ban"
"gitea"
"hydra"
"mailserver"
"mariaDB"
"nextcloud"
"nginx"
"openssh"
"webblog"
];
vHosts = (let base = domain; in [
{ domain = base; service = "simple"; }
{ domain = "builder.${base}"; service = "hydra"; }
{ domain = "cache.${base}"; service = "cache"; }
{ domain = "storage.${base}"; service = "nextcloud"; }
{ domain = "mail.${base}"; service = "mail"; }
{ domain = "git.${base}"; service = "gitea"; }
]);
firewall = {
enable = true;
allowPing = false;
allowedUDPPorts = [ 22 80 443 ];
allowedTCPPorts = [ 80 443 ];
};
};
config.services.mailman3 = {
enable = true;
site_owner = "derped@ophanim.de";
database = {
type = "mysql";
name = "mailman3";
user = "mailman3";
host = "localhost";
port = 3306;
passwordFile = "/secret/mailman3_db";
};
mta = {
lmtp_host = "mail.ophanim.de";
smtp_host = "mail.ophanim.de";
smtp_user = "mailman3";
smtp_passFile = "/secret/mailman3_mail";
};
};
}