diff options
author | aszlig <aszlig@nix.build> | 2019-01-04 01:59:28 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2019-01-04 01:59:28 +0100 |
commit | 6446d9eee88e6a708f7d48c69bb0d9001bac9f7a (patch) | |
tree | 4cadec877f88ad87bff865caeefd91a7542913d7 /nixos | |
parent | 751bdacc9b726bf8e4623a7375e96563ee3614a5 (diff) | |
download | nixlib-6446d9eee88e6a708f7d48c69bb0d9001bac9f7a.tar nixlib-6446d9eee88e6a708f7d48c69bb0d9001bac9f7a.tar.gz nixlib-6446d9eee88e6a708f7d48c69bb0d9001bac9f7a.tar.bz2 nixlib-6446d9eee88e6a708f7d48c69bb0d9001bac9f7a.tar.lz nixlib-6446d9eee88e6a708f7d48c69bb0d9001bac9f7a.tar.xz nixlib-6446d9eee88e6a708f7d48c69bb0d9001bac9f7a.tar.zst nixlib-6446d9eee88e6a708f7d48c69bb0d9001bac9f7a.zip |
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 <aszlig@nix.build>
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/nsd.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/nsd.nix b/nixos/modules/services/networking/nsd.nix index 492845eb4ec7..8b918dab86dd 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; }; |