Switch from str -> networkHostOpts for deafult-host
This commit is contained in:
parent
2d96202a58
commit
10e78ba89f
|
@ -74,7 +74,6 @@ let
|
||||||
services = {
|
services = {
|
||||||
heimdal-kdc = {
|
heimdal-kdc = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" ];
|
|
||||||
description =
|
description =
|
||||||
"Heimdal Kerberos Key Distribution Center (primary ticket server).";
|
"Heimdal Kerberos Key Distribution Center (primary ticket server).";
|
||||||
path = with pkgs; [ heimdal ];
|
path = with pkgs; [ heimdal ];
|
||||||
|
@ -277,7 +276,6 @@ let
|
||||||
services = {
|
services = {
|
||||||
heimdal-kdc-secondary = {
|
heimdal-kdc-secondary = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" ];
|
|
||||||
description =
|
description =
|
||||||
"Heimdal Kerberos Key Distribution Center (secondary ticket server).";
|
"Heimdal Kerberos Key Distribution Center (secondary ticket server).";
|
||||||
path = with pkgs; [ heimdal ];
|
path = with pkgs; [ heimdal ];
|
||||||
|
|
|
@ -130,37 +130,41 @@ let
|
||||||
} ${record.host}.";
|
} ${record.host}.";
|
||||||
};
|
};
|
||||||
|
|
||||||
domain-records = dom: zone: ''
|
domain-records = dom: zone:
|
||||||
$ORIGIN ${dom}.
|
let
|
||||||
$TTL ${zone.default-ttl}
|
defaultHostRecords = optionalString (zone.default-host != null)
|
||||||
|
(hostRecords "@" zone.default-host);
|
||||||
|
in ''
|
||||||
|
$ORIGIN ${dom}.
|
||||||
|
$TTL ${zone.default-ttl}
|
||||||
|
|
||||||
${optionalString (zone.default-host != null) "@ IN A ${zone.default-host}"}
|
${defaultHostRecords}
|
||||||
|
|
||||||
${join-lines (mxRecords zone.mx)}
|
${join-lines (mxRecords zone.mx)}
|
||||||
|
|
||||||
${dmarcRecord zone.dmarc-report-address}
|
${dmarcRecord zone.dmarc-report-address}
|
||||||
|
|
||||||
${optionalString (zone.gssapi-realm != null)
|
${optionalString (zone.gssapi-realm != null)
|
||||||
''_kerberos IN TXT "${zone.gssapi-realm}"''}
|
''_kerberos IN TXT "${zone.gssapi-realm}"''}
|
||||||
|
|
||||||
${join-lines (nsRecords zone.nameservers)}
|
${join-lines (nsRecords zone.nameservers)}
|
||||||
|
|
||||||
${join-lines (mapAttrsToList makeSrvProtocolRecords zone.srv-records)}
|
${join-lines (mapAttrsToList makeSrvProtocolRecords zone.srv-records)}
|
||||||
|
|
||||||
${join-lines (mapAttrsToList makeMetricRecords zone.metric-records)}
|
${join-lines (mapAttrsToList makeMetricRecords zone.metric-records)}
|
||||||
|
|
||||||
$TTL ${zone.host-record-ttl}
|
$TTL ${zone.host-record-ttl}
|
||||||
|
|
||||||
${join-lines (mapAttrsToList hostRecords zone.hosts)}
|
${join-lines (mapAttrsToList hostRecords zone.hosts)}
|
||||||
|
|
||||||
${join-lines (mapAttrsToList cnameRecord zone.aliases)}
|
${join-lines (mapAttrsToList cnameRecord zone.aliases)}
|
||||||
|
|
||||||
${join-lines zone.verbatim-dns-records}
|
${join-lines zone.verbatim-dns-records}
|
||||||
|
|
||||||
${join-lines (mapAttrsToList
|
${join-lines (mapAttrsToList
|
||||||
(subdom: subdomCfg: domain-records "${subdom}.${dom}" subdomCfg)
|
(subdom: subdomCfg: domain-records "${subdom}.${dom}" subdomCfg)
|
||||||
zone.subdomains)}
|
zone.subdomains)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
concatMapAttrs = f: attrs:
|
concatMapAttrs = f: attrs:
|
||||||
concatMap (x: x) (mapAttrsToList (key: val: f key val) attrs);
|
concatMap (x: x) (mapAttrsToList (key: val: f key val) attrs);
|
||||||
|
|
Loading…
Reference in New Issue