dns: serial of therecord is now updated dynamically
This commit is contained in:
parent
6119c9a88a
commit
3d15446d63
1 changed files with 19 additions and 13 deletions
|
@ -1,6 +1,11 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
cfg = config.skynet_dns;
|
||||
|
||||
# writes current date to a file
|
||||
current_date_path = pkgs.runCommand "current_date" {} "date '+%Y%m%d%S' > $out";
|
||||
# reads that date to a string
|
||||
current_date = (lib.readFile current_date_path);
|
||||
in {
|
||||
options = {
|
||||
skynet_dns = {
|
||||
|
@ -150,7 +155,8 @@ in {
|
|||
$TTL 60 ; 1 minute
|
||||
; hostmaster@skynet.ie is an email address that recieves stuff related to dns
|
||||
@ IN SOA ${cfg.own.nameserver}.skynet.ie. hostmaster.skynet.ie. (
|
||||
2023011701 ; Serial (YYYYMMDDCC)
|
||||
; Serial (YYYYMMDDCC) this has to be updated for each time the record is updated
|
||||
${current_date}
|
||||
600 ; Refresh (10 minutes)
|
||||
300 ; Retry (5 minutes)
|
||||
2419200 ; Expire (4 weeks)
|
||||
|
|
Loading…
Reference in a new issue