Setup mail server and restructure some things
This commit is contained in:
parent
4c382e629d
commit
ba93d164cf
90 changed files with 512 additions and 66 deletions
61
config/hosts/mail-1/configuration.nix
Normal file
61
config/hosts/mail-1/configuration.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "mail-1";
|
||||
useDHCP = true;
|
||||
defaultGateway = {
|
||||
address = "172.16.50.1";
|
||||
interface = "wg0";
|
||||
};
|
||||
interfaces.enp6s18.ipv4 = {
|
||||
routes = [
|
||||
{
|
||||
address = "10.201.0.0";
|
||||
prefixLength = 16;
|
||||
via = "10.202.41.1";
|
||||
}
|
||||
{
|
||||
address = "10.202.0.0";
|
||||
prefixLength = 16;
|
||||
via = "10.202.41.1";
|
||||
}
|
||||
{
|
||||
address = "172.21.87.0"; # management VPN
|
||||
prefixLength = 24;
|
||||
via = "10.202.41.1";
|
||||
}
|
||||
{
|
||||
address = "217.160.117.160"; #
|
||||
prefixLength = 32;
|
||||
via = "10.202.41.1";
|
||||
}
|
||||
];
|
||||
};
|
||||
wireguard = {
|
||||
enable = true;
|
||||
interfaces.wg0 = {
|
||||
ips = [
|
||||
"172.16.50.2/24"
|
||||
];
|
||||
peers = [
|
||||
{
|
||||
name = "lifeline";
|
||||
publicKey = "g3xZ5oJCbPtzYDPTVAS400FDw6kirGR+7300bwiZDUY=";
|
||||
presharedKeyFile = "/secrets/wireguard-lifeline-mail-1-mail-1-psk.secret";
|
||||
endpoint = "lifeline.io.grzb.de:51820";
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
privateKeyFile = "/secrets/wireguard-lifeline-mail-1-mail-1-privatekey.secret";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue