deltachat: use zerotier address if available

This commit is contained in:
Jörg Thalheim
2023-11-14 18:30:17 +01:00
parent 74fa1c2614
commit e6376262df

View File

@@ -2,9 +2,15 @@
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 25 ]; # smtp with other hosts
environment.systemPackages = [ pkgs.deltachat-desktop ];
services.maddy = {
services.maddy =
let
# FIXME move this to public setting
meshname = config.clanCore.secrets.zerotier.facts.zerotier-meshname.value or null;
domain = if meshname == null then "${config.clanCore.machineName}.local" else "${meshname}.vpn";
in
{
enable = true;
primaryDomain = "${config.clanCore.machineName}.local";
primaryDomain = domain;
config = ''
# Minimal configuration with TLS disabled, adapted from upstream example
# configuration here https://github.com/foxcpp/maddy/blob/master/maddy.conf