From 79df2e5bb476e9ad7f828e0c9602b57f556d0b73 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 27 Oct 2023 23:16:43 -0500 Subject: [PATCH] fix: ensure install script works for nvme drives --- install.bash | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install.bash b/install.bash index bf97bda..67add9f 100644 --- a/install.bash +++ b/install.bash @@ -6,8 +6,15 @@ install() { local encrypt_disk="${2}" local host="${3}" - local boot_partition="${disk}1" - local primary_partition="${disk}2" + local boot_partition="" + local primary_partition="" + if [[ "${disk}" == *"nvme"* ]]; then + local boot_partition="${disk}p1" + local primary_partition="${disk}p2" + else + local boot_partition="${disk}1" + local primary_partition="${disk}2" + fi # The size is large because I'd like to be able to hibernate my laptop in its entirety. I have 64 GB of ram. local label_crypt_luks="NixOS-Crypt"