feat: can now handle two (or more) nameservers
This commit is contained in:
parent
8db9529449
commit
654d45a842
4 changed files with 150 additions and 28 deletions
|
@ -11,6 +11,33 @@ in {
|
|||
type = lib.types.bool;
|
||||
};
|
||||
|
||||
own = {
|
||||
nameserver = lib.mkOption {
|
||||
default = "ns1";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
the hostname of this nameserver, eg ns1, ns2
|
||||
'';
|
||||
};
|
||||
|
||||
external = lib.mkOption {
|
||||
default = [ ];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
External records like: agentjones A 193.1.99.72
|
||||
'';
|
||||
};
|
||||
|
||||
cname = lib.mkOption {
|
||||
default = [ ];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
External records like: ns1 CNAME ns1
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
records = {
|
||||
external = lib.mkOption {
|
||||
default = [ ];
|
||||
|
@ -69,7 +96,7 @@ in {
|
|||
''
|
||||
$TTL 60 ; 1 minute
|
||||
; hostmaster@skynet.ie is an email address that recieves stuff related to dns
|
||||
@ IN SOA ns1.skynet.ie. hostmaster.skynet.ie. (
|
||||
@ IN SOA ${cfg.own.nameserver}.skynet.ie. hostmaster.skynet.ie. (
|
||||
2023011701 ; Serial (YYYYMMDDCC)
|
||||
600 ; Refresh (10 minutes)
|
||||
300 ; Retry (5 minutes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue