refactor: add mail-01 to colmena
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
df16d13590
commit
9d5d5f447a
9 changed files with 90 additions and 148 deletions
83
hosts/servers/mail-01.nix
Normal file
83
hosts/servers/mail-01.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ inputs, config, ... }:
|
||||
let
|
||||
floatingIPv4 = "78.47.245.200";
|
||||
in
|
||||
{
|
||||
systemd.network.networks."30-wan".addresses = [
|
||||
{
|
||||
Address = "${floatingIPv4}/32";
|
||||
}
|
||||
{
|
||||
Address = "2a01:4f8:c012:976d::/64";
|
||||
}
|
||||
];
|
||||
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.escapeangle.com";
|
||||
domains = [ "escapeangle.com" ];
|
||||
|
||||
loginAccounts = {
|
||||
"lander@escapeangle.com" = {
|
||||
hashedPasswordFile = config.sops.secrets.mail-password-lander.path;
|
||||
|
||||
aliases = [
|
||||
"postmaster@escapeangle.com"
|
||||
];
|
||||
|
||||
catchAll = [
|
||||
"escapeangle.com"
|
||||
];
|
||||
};
|
||||
|
||||
"authelia@escapeangle.com" = {
|
||||
hashedPasswordFile = config.sops.secrets.mail-password-authelia.path;
|
||||
};
|
||||
|
||||
"forgejo@escapeangle.com" = {
|
||||
hashedPasswordFile = config.sops.secrets.mail-password-forgejo.path;
|
||||
};
|
||||
};
|
||||
|
||||
extraVirtualAliases = {
|
||||
"abuse@escapeangle.com" = "lander@escapeangle.com";
|
||||
};
|
||||
|
||||
certificateScheme = "acme-nginx";
|
||||
|
||||
enableImap = true;
|
||||
enableImapSsl = true;
|
||||
|
||||
enableManageSieve = true;
|
||||
|
||||
virusScanning = true;
|
||||
};
|
||||
|
||||
services.postfix.config = {
|
||||
"smtp_bind_address" = floatingIPv4;
|
||||
};
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ./mail-01.yaml;
|
||||
validateSopsFiles = false;
|
||||
|
||||
secrets = {
|
||||
mail-password-lander = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
};
|
||||
|
||||
mail-password-authelia = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
};
|
||||
|
||||
mail-password-forgejo = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue