pkgs/switch-report: fix vlan ordering

This commit is contained in:
Astro 2022-10-23 23:03:20 +02:00
parent 271ad5c7ce
commit dce3ffd580
1 changed files with 13 additions and 1 deletions

View File

@ -49,7 +49,19 @@ let
map (net:
"${net} (`${toString config.site.net.${net}.vlan}`)"
) (builtins.sort (a: b:
config.site.net.${a}.vlan < config.site.net.${b}.vlan
let
vlanA = config.site.net.${a}.vlan;
vlanB = config.site.net.${b}.vlan;
in
(
if vlanA == null
then 4096
else vlanA
) < (
if vlanB == null
then 4096
else vlanB
)
) link.nets)
)
}|