From ffbe3656ecac280fed64029cb92535cef6c12308 Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 6 Jan 2022 21:49:31 -0800 Subject: [PATCH] No pubsub for now. --- lib/fudo/jabber.nix | 3 +-- lib/lib/dns.nix | 42 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/lib/fudo/jabber.nix b/lib/fudo/jabber.nix index 553e5c0..6b651d5 100644 --- a/lib/fudo/jabber.nix +++ b/lib/fudo/jabber.nix @@ -213,8 +213,7 @@ in { acme.host-domains.${hostname} = mapAttrs' (site: siteOpts: nameValuePair siteOpts.hostname { extra-domains = - (optional (siteOpts.hostname != host-fqdn) host-fqdn) ++ - [ "pubsub.${site}" ]; + (optional (siteOpts.hostname != host-fqdn) host-fqdn); local-copies.ejabberd = { user = cfg.user; group = cfg.group; diff --git a/lib/lib/dns.nix b/lib/lib/dns.nix index 0551123..c712bfc 100644 --- a/lib/lib/dns.nix +++ b/lib/lib/dns.nix @@ -75,7 +75,7 @@ let a-record = host: hostOpts: optional (hostOpts.ipv4-address != null) "${host} IN A ${hostOpts.ipv4-address}"; aaaa-record = host: hostOpts: optional (hostOpts.ipv6-address != null) - "${host} IN A ${hostOpts.ipv6-address}"; + "${host} IN AAAA ${hostOpts.ipv6-address}"; description-record = host: hostOpts: optional (hostOpts.description != null) ''${host} IN TXT "${hostOpts.description}"''; in flatmapAttrsToList @@ -97,27 +97,61 @@ let $ORIGIN ${dom}. $TTL ${zone.default-ttl} + ### + # Default Host + ### ${optionalString (zone.default-host != null) "@ IN A ${zone.default-host}"} + ### + # MX Records + ### ${join-lines (mxRecords zone.mx)} + # dmarc + ${dmarcRecord zone.dmarc-report-address} + + ### + # Kerberos Realm + ### ${optionalString (zone.gssapi-realm != null) ''_kerberos IN TXT "${zone.gssapi-realm}"''} - $TTL ${zone.host-record-ttl} - + ### + # Nameservers + ### ${join-lines (nsRecords dom zone.nameservers)} ${join-lines (nsARecords dom zone.nameservers)} - ${dmarcRecord zone.dmarc-report-address} + ### + # General Records + ### + $TTL ${zone.host-record-ttl} + ### + # SRV Records + ### ${join-lines (mapAttrsToList makeSrvProtocolRecords zone.srv-records)} + + ### + # Host Records + ### ${join-lines (mapAttrsToList hostRecords zone.hosts)} + + ### + # CNAMEs + ### ${join-lines (mapAttrsToList cnameRecord zone.aliases)} + + ### + # Verbatim Records + ### ${join-lines zone.verbatim-dns-records} + ### + # Subdomains of ${dom} + ### ${join-lines (mapAttrsToList (subdom: subdomCfg: subdomain-record "${subdom}.${dom}" subdomCfg) zone.subdomains)}