Delete partitions in descending order
This commit is contained in:
parent
70964072b6
commit
9f300cfecd
1 changed files with 3 additions and 1 deletions
|
@ -102,7 +102,9 @@ let
|
||||||
|
|
||||||
cleanup = lib.strings.concatLines (builtins.map
|
cleanup = lib.strings.concatLines (builtins.map
|
||||||
(partition: "${fdiskCommand "--delete ${diskVar} ${toString partition.index}"} || true")
|
(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
|
fdiskCommands = lib.strings.concatLines
|
||||||
(lib.optionals config.wipe [
|
(lib.optionals config.wipe [
|
||||||
|
|
Loading…
Reference in a new issue