Remove mail-2
This commit is contained in:
parent
8d107286a9
commit
b3f6e37765
5 changed files with 0 additions and 156 deletions
|
|
@ -1,9 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
security.acme.certs = {
|
|
||||||
"mail-2.grzb.de" = {
|
|
||||||
listenHTTP = ":80";
|
|
||||||
reloadServices = [ "postfix.service" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
device = "/dev/vda";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.network = {
|
|
||||||
enable = true;
|
|
||||||
networks = {
|
|
||||||
"enp6s18" = {
|
|
||||||
matchConfig.Name = "enp6s18";
|
|
||||||
address = [
|
|
||||||
"10.201.41.100/24"
|
|
||||||
];
|
|
||||||
routes = [
|
|
||||||
{
|
|
||||||
Gateway = "10.201.41.1";
|
|
||||||
Destination = "10.201.0.0/16";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Gateway = "10.201.41.1";
|
|
||||||
Destination = "10.202.0.0/16";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Gateway = "10.201.41.1";
|
|
||||||
Destination = "172.21.87.0/24";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
Gateway = "10.201.41.1";
|
|
||||||
Destination = "217.160.117.160/32";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
linkConfig.RequiredForOnline = "routable";
|
|
||||||
};
|
|
||||||
"wg0" = {
|
|
||||||
matchConfig.Name = "wg0";
|
|
||||||
address = [
|
|
||||||
"172.18.50.2/24"
|
|
||||||
];
|
|
||||||
DHCP = "no";
|
|
||||||
gateway = [
|
|
||||||
"172.18.50.1"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
netdevs = {
|
|
||||||
"wg0" = {
|
|
||||||
netdevConfig = {
|
|
||||||
Kind = "wireguard";
|
|
||||||
Name = "wg0";
|
|
||||||
};
|
|
||||||
wireguardConfig = {
|
|
||||||
PrivateKeyFile = "/secrets/wireguard-mail-2-wg0-privatekey.secret";
|
|
||||||
};
|
|
||||||
wireguardPeers = [{
|
|
||||||
PublicKey = "Nnf7x+Yd+l8ZkK2BTq1lK3iiTYgdrgL9PQ/je8smug4=";
|
|
||||||
PresharedKeyFile = "/secrets/wireguard-lifeline-mail-2-mail-2-psk.secret";
|
|
||||||
Endpoint = "217.160.117.160:51820";
|
|
||||||
AllowedIPs = [ "0.0.0.0/0" ];
|
|
||||||
PersistentKeepalive = 25;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "mail-2";
|
|
||||||
useDHCP = false;
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
allowedTCPPorts = [ 25 80 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wireguard-tools
|
|
||||||
];
|
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./configuration.nix
|
|
||||||
./postfix.nix
|
|
||||||
./acme.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
# Postfix relay configuration, see: https://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup
|
|
||||||
services.postfix = {
|
|
||||||
enable = true;
|
|
||||||
hostname = "mail-2.grzb.de";
|
|
||||||
relayDomains = [
|
|
||||||
"grzb.de"
|
|
||||||
"nekover.se"
|
|
||||||
];
|
|
||||||
sslCert = "${config.security.acme.certs."mail-2.grzb.de".directory}/fullchain.pem";
|
|
||||||
sslKey = "${config.security.acme.certs."mail-2.grzb.de".directory}/key.pem";
|
|
||||||
extraConfig = ''
|
|
||||||
message_size_limit = 20971520
|
|
||||||
smtpd_relay_restrictions = permit_mynetworks reject_unauth_destination
|
|
||||||
proxy_interfaces = 217.160.117.160
|
|
||||||
relay_recipient_maps =
|
|
||||||
smtp_tls_ciphers = high
|
|
||||||
smtp_tls_exclude_ciphers = MD5, DES, ADH, RC4, PSD, SRP, 3DES, eNULL, aNULL
|
|
||||||
smtp_tls_mandatory_ciphers = high
|
|
||||||
smtp_tls_mandatory_exclude_ciphers = MD5, DES, ADH, RC4, PSD, SRP, 3DES, eNULL, aNULL
|
|
||||||
smtp_tls_mandatory_protocols = TLSv1.3, TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
|
|
||||||
smtp_tls_protocols = TLSv1.3, TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
|
|
||||||
smtpd_tls_auth_only = yes
|
|
||||||
smtpd_tls_ciphers = high
|
|
||||||
smtpd_tls_eecdh_grade = ultra
|
|
||||||
smtpd_tls_exclude_ciphers = MD5, DES, ADH, RC4, PSD, SRP, 3DES, eNULL, aNULL
|
|
||||||
smtpd_tls_loglevel = 1
|
|
||||||
smtpd_tls_mandatory_ciphers = high
|
|
||||||
smtpd_tls_mandatory_exclude_ciphers = MD5, DES, ADH, RC4, PSD, SRP, 3DES, eNULL, aNULL
|
|
||||||
smtpd_tls_mandatory_protocols = TLSv1.3, TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
|
|
||||||
smtpd_tls_protocols = TLSv1.3, TLSv1.2, TLSv1.1, !TLSv1, !SSLv2, !SSLv3
|
|
||||||
tls_preempt_cipherlist = yes
|
|
||||||
tls_random_source = dev:/dev/urandom
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{ keyCommandEnv, ... }:
|
|
||||||
{
|
|
||||||
deployment.keys = {
|
|
||||||
"wireguard-mail-2-wg0-privatekey.secret" = {
|
|
||||||
keyCommand = keyCommandEnv ++ [ "pass" "wireguard/mail-2-wg0-privatekey" ];
|
|
||||||
destDir = "/secrets";
|
|
||||||
user = "root";
|
|
||||||
group = "systemd-network";
|
|
||||||
permissions = "0640";
|
|
||||||
uploadAt = "pre-activation";
|
|
||||||
};
|
|
||||||
"wireguard-lifeline-mail-2-mail-2-psk.secret" = {
|
|
||||||
keyCommand = keyCommandEnv ++ [ "pass" "wireguard/lifeline-mail-2/psk" ];
|
|
||||||
destDir = "/secrets";
|
|
||||||
user = "root";
|
|
||||||
group = "systemd-network";
|
|
||||||
permissions = "0640";
|
|
||||||
uploadAt = "pre-activation";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue