dns: remove leading spaces
This commit is contained in:
parent
60ec19284d
commit
6cb3fcf409
1 changed files with 70 additions and 73 deletions
|
@ -7,10 +7,9 @@ let
|
||||||
|
|
||||||
# base config for domains we own (skynet.ie, csn.ul.ie, ulcompsoc.ie)
|
# base config for domains we own (skynet.ie, csn.ul.ie, ulcompsoc.ie)
|
||||||
get_config_file = (domain:
|
get_config_file = (domain:
|
||||||
''
|
''$TTL 60 ; 1 minute
|
||||||
$TTL 60 ; 1 minute
|
; hostmaster@${domain} is an email address that recieves stuff related to dns
|
||||||
; hostmaster@${domain} is an email address that recieves stuff related to dns
|
@ IN SOA ${cfg.own.nameserver}.${domain}. hostmaster.${domain}. (
|
||||||
@ IN SOA ${cfg.own.nameserver}.${domain}. hostmaster.${domain}. (
|
|
||||||
; Serial (YYYYMMDDCC) this has to be updated for each time the record is updated
|
; Serial (YYYYMMDDCC) this has to be updated for each time the record is updated
|
||||||
${current_date}
|
${current_date}
|
||||||
600 ; Refresh (10 minutes)
|
600 ; Refresh (10 minutes)
|
||||||
|
@ -19,51 +18,50 @@ let
|
||||||
3600 ; Minimum (1 hour)
|
3600 ; Minimum (1 hour)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ NS ns1.${domain}.
|
@ NS ns1.${domain}.
|
||||||
@ NS ns2.${domain}.
|
@ NS ns2.${domain}.
|
||||||
; @ stands for teh root domain so teh A record below is where ${domain} points to
|
; @ stands for teh root domain so teh A record below is where ${domain} points to
|
||||||
;@ A 193.1.99.76
|
;@ A 193.1.99.76
|
||||||
;@ MX 5 ${domain}.
|
;@ MX 5 ${domain}.
|
||||||
|
|
||||||
; can have multiple mailserves
|
; can have multiple mailserves
|
||||||
@ MX 10 mail.${domain}.
|
@ MX 10 mail.${domain}.
|
||||||
|
|
||||||
|
|
||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
; Server Names
|
; Server Names
|
||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
|
|
||||||
; External addresses
|
; External addresses
|
||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
${lib.strings.concatMapStrings (x: x + "\n") cfg.records.external}
|
${lib.strings.concatMapStrings (x: x + "\n") cfg.records.external}
|
||||||
|
|
||||||
|
|
||||||
; this is fixed for now
|
; this is fixed for now
|
||||||
wintermute A 193.1.101.148
|
wintermute A 193.1.101.148
|
||||||
|
|
||||||
|
|
||||||
; internal addresses
|
; internal addresses
|
||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
; May come back to this idea in teh future
|
; May come back to this idea in teh future
|
||||||
; agentjones.int A 172.20.20.1
|
; agentjones.int A 172.20.20.1
|
||||||
|
|
||||||
|
|
||||||
; cname's
|
; cname's
|
||||||
; ------------------------------------------
|
; ------------------------------------------
|
||||||
${lib.strings.concatMapStrings (x: x + "\n") cfg.records.cname}
|
${lib.strings.concatMapStrings (x: x + "\n") cfg.records.cname}
|
||||||
|
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/reference_guide/s2-bind-configuration-zone-reverse
|
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/reference_guide/s2-bind-configuration-zone-reverse
|
||||||
# config for our reverse dnspointers (not properly working)
|
# config for our reverse dnspointers (not properly working)
|
||||||
get_config_file_rev = (domain:
|
get_config_file_rev = (domain:
|
||||||
''
|
''$ORIGIN 99.1.193.in-addr.arpa.
|
||||||
$ORIGIN 99.1.193.in-addr.arpa.
|
$TTL 60 ; 1 minute
|
||||||
$TTL 60 ; 1 minute
|
; hostmaster@skynet.ie is an email address that recieves stuff related to dns
|
||||||
; hostmaster@skynet.ie is an email address that recieves stuff related to dns
|
@ IN SOA ${cfg.own.nameserver}.skynet.ie. hostmaster.skynet.ie. (
|
||||||
@ IN SOA ${cfg.own.nameserver}.skynet.ie. hostmaster.skynet.ie. (
|
|
||||||
; Serial (YYYYMMDDCC) this has to be updated for each time the record is updated
|
; Serial (YYYYMMDDCC) this has to be updated for each time the record is updated
|
||||||
${current_date}
|
${current_date}
|
||||||
600 ; Refresh (10 minutes)
|
600 ; Refresh (10 minutes)
|
||||||
|
@ -72,19 +70,18 @@ let
|
||||||
3600 ; Minimum (1 hour)
|
3600 ; Minimum (1 hour)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ NS ns1.skynet.ie.
|
@ NS ns1.skynet.ie.
|
||||||
@ NS ns2.skynet.ie.
|
@ NS ns2.skynet.ie.
|
||||||
|
|
||||||
${lib.strings.concatMapStrings (x: x + "\n") cfg.records.reverse}
|
${lib.strings.concatMapStrings (x: x + "\n") cfg.records.reverse}
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
# domains we dont have proper ownship over, only here to ensure the logs dont get cluttered.
|
# domains we dont have proper ownship over, only here to ensure the logs dont get cluttered.
|
||||||
get_config_file_old_domains = (domain:
|
get_config_file_old_domains = (domain:
|
||||||
''
|
''$TTL 60 ; 1 minute
|
||||||
$TTL 60 ; 1 minute
|
; hostmaster@skynet.ie is an email address that recieves stuff related to dns
|
||||||
; hostmaster@skynet.ie is an email address that recieves stuff related to dns
|
@ IN SOA ${cfg.own.nameserver}.skynet.ie. hostmaster.skynet.ie. (
|
||||||
@ IN SOA ${cfg.own.nameserver}.skynet.ie. hostmaster.skynet.ie. (
|
|
||||||
; Serial (YYYYMMDDCC) this has to be updated for each time the record is updated
|
; Serial (YYYYMMDDCC) this has to be updated for each time the record is updated
|
||||||
${current_date}
|
${current_date}
|
||||||
600 ; Refresh (10 minutes)
|
600 ; Refresh (10 minutes)
|
||||||
|
@ -93,10 +90,10 @@ let
|
||||||
3600 ; Minimum (1 hour)
|
3600 ; Minimum (1 hour)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ NS ns1.skynet.ie.
|
@ NS ns1.skynet.ie.
|
||||||
@ NS ns2.skynet.ie.
|
@ NS ns2.skynet.ie.
|
||||||
|
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
# arrys of teh two nameservers
|
# arrys of teh two nameservers
|
||||||
|
@ -156,10 +153,10 @@ let
|
||||||
create_entry_zone = (domain: extraConfig: {
|
create_entry_zone = (domain: extraConfig: {
|
||||||
"${domain}" = {
|
"${domain}" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
${extraConfig}
|
${extraConfig}
|
||||||
// for bumping the config
|
// for bumping the config
|
||||||
// ${current_date}
|
// ${current_date}
|
||||||
'';
|
'';
|
||||||
# really wish teh nixos config didnt use master/slave
|
# really wish teh nixos config didnt use master/slave
|
||||||
master = cfg.primary;
|
master = cfg.primary;
|
||||||
masters = primaries;
|
masters = primaries;
|
||||||
|
@ -180,12 +177,12 @@ let
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
owned =
|
owned =
|
||||||
if cfg.primary then
|
if cfg.primary then
|
||||||
''
|
''
|
||||||
allow-update { key rfc2136key.skynet.ie.; };
|
allow-update { key rfc2136key.skynet.ie.; };
|
||||||
|
|
||||||
dnssec-policy default;
|
dnssec-policy default;
|
||||||
inline-signing yes;
|
inline-signing yes;
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
"";
|
"";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue