dns: use epoch for the serial instead of YYYYMMDDSS.

Lacking hours/min could mean that the YYYYMMDD could remain the same but the SS would decrece, which is not what we want
This commit is contained in:
silver 2023-04-25 14:31:19 +01:00
parent 612ba70bbf
commit c0f160faa3

View file

@ -2,8 +2,8 @@
let
cfg = config.skynet_dns;
# writes current date to a file
current_date_path = pkgs.runCommand "current_date" {} "date '+%Y%m%d%S' > $out";
# writes current epoch to a file (will need to be fixed in 2038)
current_date_path = pkgs.runCommand "current_date" {} "date '+%s' > $out";
# reads that date to a string
current_date = (lib.readFile current_date_path);
in {