Make vdev sort only move empty modes to the start

This commit is contained in:
Michon van Dooren committed 2024-11-18 22:49:51 +01:00
1 parent d192ffd944
commit caad548415
1 file changed
+1 -1
+1 -1
View File
@@ -169,7 +169,7 @@ in
formatVdev = type: vdev: formatOutput type vdev.mode vdev.members;
formatVdevList = type: vdevs: lib.concatMapStrings
(formatVdev type)
(builtins.sort (a: b: a.mode < b.mode) vdevs);
(builtins.sort (a: _: a.mode == "") vdevs);
hasTopology = !(builtins.isString config.mode);
mode = if hasTopology then "prescribed" else config.mode;
topology = lib.optionalAttrs hasTopology config.mode.topology;