mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Add backup mail server
This commit is contained in:
parent
afcaada363
commit
13716ee5c0
5 changed files with 27 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
{ lib, modulesPath, ... }: with lib;
|
||||
|
||||
systemConfiguration {
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
|
||||
boot.loader.grub = enabled {
|
||||
device = "/dev/vda";
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{ config, lib, ... }: with lib;
|
||||
{ self, config, lib, ... }: with lib;
|
||||
|
||||
let
|
||||
inherit (config.networking) domain;
|
||||
|
||||
fqdn = "mail.${domain}";
|
||||
in systemConfiguration {
|
||||
imports = [(self + /hosts/cube/acme)];
|
||||
|
||||
secrets.mailPassword.file = ./password.hash.age;
|
||||
|
||||
services.prometheus.exporters.postfix = enabled {
|
||||
|
@ -12,9 +14,9 @@ in systemConfiguration {
|
|||
};
|
||||
|
||||
mailserver = enabled {
|
||||
inherit fqdn;
|
||||
fqdn = mkDefault fqdn;
|
||||
|
||||
domains = [ domain ];
|
||||
domains = mkDefault [ domain ];
|
||||
certificateScheme = "acme";
|
||||
|
||||
# We use systemd-resolved instead of Knot Resolver.
|
||||
|
@ -31,7 +33,7 @@ in systemConfiguration {
|
|||
vmailGroupName = "mail";
|
||||
|
||||
dmarcReporting = enabled {
|
||||
inherit domain;
|
||||
domain = head config.mailserver.domains;
|
||||
|
||||
organizationName = "Doofemshmirtz Evil Inc.";
|
||||
};
|
||||
|
@ -40,8 +42,8 @@ in systemConfiguration {
|
|||
indexAttachments = true;
|
||||
};
|
||||
|
||||
loginAccounts."contact@${domain}" = {
|
||||
aliases = [ "@${domain}" ];
|
||||
loginAccounts."contact@${head config.mailserver.domains}" = {
|
||||
aliases = [ "@${head config.mailserver.domains}" ];
|
||||
|
||||
hashedPasswordFile = config.secrets.mailPassword.path;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, lib, modulesPath, ... }: with lib;
|
||||
|
||||
systemConfiguration {
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
|
||||
boot.loader.grub = enabled {
|
||||
efiSupport = true;
|
||||
|
|
16
hosts/nine/mail2.nix
Normal file
16
hosts/nine/mail2.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, self, lib, ... }: with lib;
|
||||
|
||||
let
|
||||
inherit (config.networking) domain;
|
||||
|
||||
fqdn = "mail2.${domain}";
|
||||
in systemConfiguration {
|
||||
imports = [(self + /hosts/disk/mail)];
|
||||
|
||||
mailserver = {
|
||||
inherit fqdn;
|
||||
|
||||
# Not [ domain ] because this is a backup mailserver. contact@mail2.rgbcu.be.
|
||||
domains = [ fqdn ];
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, modulesPath, ... }: with lib;
|
||||
|
||||
systemConfiguration {
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
|
||||
boot.loader.grub = enabled {
|
||||
device = "/dev/vda";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue