From fe9e0fea91dc31396cbdb349b010ebd9d04cd607 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 16 Nov 2022 20:27:35 +0100 Subject: [PATCH] pkgs/switch-report: don't serialize vlan == null --- nix/pkgs/switch-report.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/pkgs/switch-report.nix b/nix/pkgs/switch-report.nix index 98552ee..7597247 100644 --- a/nix/pkgs/switch-report.nix +++ b/nix/pkgs/switch-report.nix @@ -51,7 +51,9 @@ let }${ lib.concatStringsSep ", " ( map (net: - "${net} (`${toString config.site.net.${net}.vlan}`)" + if config.site.net.${net}.vlan != null + then "${net} (`${toString config.site.net.${net}.vlan}`)" + else net ) (builtins.sort (a: b: let vlanA = config.site.net.${a}.vlan;