fix: ensure install script works for nvme drives

This commit is contained in:
Price Hiller 2023-10-27 23:16:43 -05:00
parent 2d08a50d8d
commit 79df2e5bb4
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

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