Delete partitions in descending order
This commit is contained in:
parent
70964072b6
commit
9f300cfecd
|
@ -102,7 +102,9 @@ let
|
|||
|
||||
cleanup = lib.strings.concatLines (builtins.map
|
||||
(partition: "${fdiskCommand "--delete ${diskVar} ${toString partition.index}"} || true")
|
||||
(builtins.filter (_: !_.keepExisting) partitions));
|
||||
(lib.lists.sortOn
|
||||
(partition: partition.index * -1)
|
||||
(builtins.filter (_: !_.keepExisting) partitions)));
|
||||
|
||||
fdiskCommands = lib.strings.concatLines
|
||||
(lib.optionals config.wipe [
|
||||
|
|
Loading…
Reference in a new issue