From 6446d9eee88e6a708f7d48c69bb0d9001bac9f7a Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 4 Jan 2019 01:59:28 +0100 Subject: [PATCH] nixos/nsd: Improve checking for empty dnssec zones While at it (see previous commit), using attrNames in combination with length is a bit verbose for checking whether the filtered attribute set is empty, so let's just compare it against an empty attribute set. Signed-off-by: aszlig --- nixos/modules/services/networking/nsd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index 492845eb4ec..8b918dab86d 100644 --- a/nixos/modules/services/networking/nsd.nix +++ b/nixos/modules/services/networking/nsd.nix @@ -435,7 +435,7 @@ let dnssecZones = (filterAttrs (n: v: if v ? dnssec then v.dnssec else false) zoneConfigs); - dnssec = length (attrNames dnssecZones) != 0; + dnssec = dnssecZones != {}; dnssecTools = pkgs.bind.override { enablePython = true; };