pkgs/switches/shared: fix for nullable vlan
This commit is contained in:
parent
77c0477bd0
commit
01933d17ca
|
@ -17,6 +17,13 @@ rec {
|
|||
else ra < rb
|
||||
);
|
||||
sortNetsByVlan = builtins.sort (net1: net2:
|
||||
config.site.net.${net1}.vlan < config.site.net.${net2}.vlan
|
||||
let
|
||||
vlan1 = config.site.net.${net1}.vlan;
|
||||
vlan2 = config.site.net.${net2}.vlan;
|
||||
in if vlan1 == null
|
||||
then true
|
||||
else if vlan2 == null
|
||||
then false
|
||||
else vlan1 < vlan2
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue