Remove redundancy

This commit is contained in:
Manuel Thalmann 2024-12-07 17:50:10 +01:00
parent 7b5564a632
commit 5ffe98a56d

View file

@ -104,7 +104,6 @@ let
if append then "--append" else ""
} ${deviceVar}"
}";
wipeScript = script: fdiskScript script [ ] false;
appendScript = index: script: fdiskScript script [ "-N" (builtins.toString index) ] true;
cleanup = lib.strings.concatLines (builtins.map
@ -116,7 +115,7 @@ let
fdiskCommands = lib.strings.concatLines
(lib.optionals config.wipe [
cleanup
(wipeScript "label: gpt")
(fdiskScript "label: gpt" [ ] false)
] ++ (builtins.concatMap
(
partition: