Nest in options...
This commit is contained in:
parent
d150487ede
commit
4dd1c57d05
@ -74,112 +74,114 @@ let
|
|||||||
|
|
||||||
zoneOpts = {
|
zoneOpts = {
|
||||||
options = with types; {
|
options = with types; {
|
||||||
hosts = attrsOf (submodule networkHostOpts);
|
hosts = mkOption {
|
||||||
description = "Hosts on the local network, with relevant settings.";
|
attrsOf (submodule networkHostOpts);
|
||||||
default = { };
|
description = "Hosts on the local network, with relevant settings.";
|
||||||
};
|
default = { };
|
||||||
|
};
|
||||||
|
|
||||||
nameservers = mkOption {
|
nameservers = mkOption {
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
description = "List of zone nameservers.";
|
description = "List of zone nameservers.";
|
||||||
example = [ "ns1.domain.com." "10.0.0.1" ];
|
example = [ "ns1.domain.com." "10.0.0.1" ];
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
srv-records = mkOption {
|
srv-records = mkOption {
|
||||||
type = attrsOf (attrsOf (listOf (submodule srvRecordEntry)));
|
type = attrsOf (attrsOf (listOf (submodule srvRecordEntry)));
|
||||||
description = "SRV records for this zone.";
|
description = "SRV records for this zone.";
|
||||||
example = {
|
example = {
|
||||||
tcp = {
|
tcp = {
|
||||||
xmpp = [{
|
xmpp = [{
|
||||||
host = "my-host.com";
|
host = "my-host.com";
|
||||||
port = 55;
|
port = 55;
|
||||||
}];
|
}];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
meric-records = mkOption {
|
meric-records = mkOption {
|
||||||
type = attrsOf (listOf (submodule srvRecordEntry));
|
type = attrsOf (listOf (submodule srvRecordEntry));
|
||||||
description = "Map of metric types to a list of SRV host records.";
|
description = "Map of metric types to a list of SRV host records.";
|
||||||
example = {
|
example = {
|
||||||
node = [{
|
node = [{
|
||||||
host = "my-host.my-domain.com";
|
host = "my-host.my-domain.com";
|
||||||
port = 443;
|
port = 443;
|
||||||
}];
|
}];
|
||||||
postfix = [{
|
postfix = [{
|
||||||
host = "my-mailserver.my-domain.com";
|
host = "my-mailserver.my-domain.com";
|
||||||
port = 443;
|
port = 443;
|
||||||
}];
|
}];
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
};
|
};
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
aliases = mkOption {
|
aliases = mkOption {
|
||||||
type = attrsOf str;
|
type = attrsOf str;
|
||||||
description =
|
description =
|
||||||
"A mapping of host-alias -> hostname to add to the doamin record.";
|
"A mapping of host-alias -> hostname to add to the doamin record.";
|
||||||
default = { };
|
default = { };
|
||||||
example = {
|
example = {
|
||||||
my-alias = "some-host";
|
my-alias = "some-host";
|
||||||
external-alias = "host-outside.domain.com.";
|
external-alias = "host-outside.domain.com.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
verbatim-dns-records = mkOption {
|
verbatim-dns-records = mkOption {
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
description = "Records to be inserted verbatim into the DNS zone.";
|
description = "Records to be inserted verbatim into the DNS zone.";
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [ "some-host IN CNAME target-host" ];
|
example = [ "some-host IN CNAME target-host" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
dmark-report-address = mkOption {
|
dmark-report-address = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
description = "Email address to recieve DMARC reports, if any.";
|
description = "Email address to recieve DMARC reports, if any.";
|
||||||
example = "admin-user@domain.com";
|
example = "admin-user@domain.com";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
default-host = mkOption {
|
default-host = mkOption {
|
||||||
type = nullOr (submodule networkHostOpts);
|
type = nullOr (submodule networkHostOpts);
|
||||||
description =
|
description =
|
||||||
"Network properties of the default host for this domain, if any.";
|
"Network properties of the default host for this domain, if any.";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
mx = mkOption {
|
mx = mkOption {
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
description = "A list of mail servers which serve this domain.";
|
description = "A list of mail servers which serve this domain.";
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
gssapi-realm = mkOption {
|
gssapi-realm = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
description = "Kerberos GSSAPI realm of the zone.";
|
description = "Kerberos GSSAPI realm of the zone.";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
default-ttl = mkOption {
|
default-ttl = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Default time-to-live for this zone.";
|
description = "Default time-to-live for this zone.";
|
||||||
default = "3h";
|
default = "3h";
|
||||||
};
|
};
|
||||||
|
|
||||||
host-record-ttl = mkOption {
|
host-record-ttl = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Default time-to-live for hosts in this zone";
|
description = "Default time-to-live for hosts in this zone";
|
||||||
default = "1h";
|
default = "1h";
|
||||||
};
|
};
|
||||||
|
|
||||||
description = mkOption {
|
description = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
description = "Description of this zone.";
|
description = "Description of this zone.";
|
||||||
};
|
};
|
||||||
|
|
||||||
subdomains = mkOption {
|
subdomains = mkOption {
|
||||||
type = attrsOf (submodule zoneOpts);
|
type = attrsOf (submodule zoneOpts);
|
||||||
description = "Subdomains of the current zone.";
|
description = "Subdomains of the current zone.";
|
||||||
default = { };
|
default = { };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user