Remove disko format argument
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -70,7 +70,7 @@ prepare_disk() {
|
||||
local disko_mode="$1"
|
||||
mkdir -p /mnt
|
||||
root=$(mktemp -d /mnt/install.XXXXXX)
|
||||
disko -m "$disko_mode" --yes-wipe-all-disks --root-mountpoint "$root" "$flake/hosts/$host/format.nix" --arg device "\"$device\""
|
||||
disko -m "$disko_mode" --yes-wipe-all-disks --root-mountpoint "$root" "$flake/hosts/$host/format.nix"
|
||||
}
|
||||
|
||||
copy_keys() {
|
||||
@@ -109,7 +109,7 @@ finish() {
|
||||
|
||||
cleanup() {
|
||||
rm -f /tmp/installer.key
|
||||
if [[ -n "$host" && -n "$device" ]]; then disko -m "unmount" "$flake/hosts/$host/format.nix" --arg device "\"$device\""; fi
|
||||
if [[ -n "$host" ]]; then disko -m "unmount" "$flake/hosts/$host/format.nix"; fi
|
||||
if [[ -d "$root" ]]; then rmdir "$root"; fi
|
||||
}
|
||||
|
||||
@@ -151,8 +151,6 @@ check_host
|
||||
check_key
|
||||
until set_password_file; do echo "Passwords did not match, please try again."; done
|
||||
|
||||
device=$(grep -oP '(?<=device = ")[^"]+' "$flake/hosts/$host/default.nix")
|
||||
|
||||
case "$mode" in
|
||||
install)
|
||||
prepare_disk "destroy,format,mount"
|
||||
|
Reference in New Issue
Block a user