From 4625eef8cb7b00a3b21e0e91adac7a00c9178b8c Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 26 Mar 2022 04:07:00 +0100 Subject: [PATCH] nixos-module/container/dns: remove IFD for obtaining serial now 100% IFD free --- nix/nixos-module/container/dns.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/nix/nixos-module/container/dns.nix b/nix/nixos-module/container/dns.nix index 9ec4ada..a7f36b0 100644 --- a/nix/nixos-module/container/dns.nix +++ b/nix/nixos-module/container/dns.nix @@ -1,14 +1,7 @@ { hostName, config, lib, pkgs, self, ... }: let - serial = - let - timestamp = toString self.lastModified; - datePkg = pkgs.runCommandLocal "date-${timestamp}" {} '' - date -d @${timestamp} +%Y%m%d%H > $out - ''; - in - toString (import datePkg); + serial = builtins.substring 0 10 self.lastModifiedDate; generateZoneFile = { name, ns, records, dynamic }: builtins.toFile "${name}.zone" ''