Delete partitions in descending order

This commit is contained in:
Manuel Thalmann 2024-10-26 00:01:23 +02:00
parent 70964072b6
commit 9f300cfecd

View file

@ -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 [