Sort partitions only by index
This commit is contained in:
parent
e9c4290176
commit
32dfdcc6c3
|
@ -78,14 +78,9 @@
|
||||||
chooseDisk ${diskVarName} "Which disk do you wish to install the OS on?";
|
chooseDisk ${diskVarName} "Which disk do you wish to install the OS on?";
|
||||||
'';
|
'';
|
||||||
|
|
||||||
partitions = builtins.foldl'
|
partitions = lib.lists.sortOn
|
||||||
(list: predicate: lib.lists.sortOn predicate list)
|
|
||||||
(builtins.filter (_: _ != null) (builtins.attrValues config.partitions))
|
|
||||||
[
|
|
||||||
(_: _.index)
|
(_: _.index)
|
||||||
(_: _.order)
|
(builtins.filter (_: _ != null) (builtins.attrValues config.partitions));
|
||||||
(_: if ((!isSwap _) && (_.size == null)) then 1 else 0)
|
|
||||||
];
|
|
||||||
|
|
||||||
mkType = type:
|
mkType = type:
|
||||||
lib.strings.escapeShellArg (
|
lib.strings.escapeShellArg (
|
||||||
|
@ -220,12 +215,6 @@
|
||||||
description = "The index of the partition.";
|
description = "The index of the partition.";
|
||||||
};
|
};
|
||||||
|
|
||||||
order = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
description = "The sort order of the partition creation.";
|
|
||||||
default = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
label = mkOption {
|
label = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "The label of the partition.";
|
description = "The label of the partition.";
|
||||||
|
|
Loading…
Reference in a new issue