simplify filesystems on setup guide

This commit is contained in:
ChaotiCryptidz 2022-02-16 16:58:42 +00:00
parent ad79d05d08
commit 50f2a36c1b
No known key found for this signature in database

View file

@ -1,25 +1,12 @@
# Lappy Setup Guide # Lappy Setup Guide
## Filesystems ## Filesystems
``` ```
export DEVICE_ROOT=/dev/nvme0n1 mkdir /usb
export DEVICE_BOOT_PART=${DEVICE_ROOT}p1 cryptsetup luksOpen /dev/disk/by-partname/usb usb_unencrypted
export DEVICE_ENCRYPTED_ROOT_PART=${DEVICE_ROOT}p2 mount /dev/mapper/usb_unencrypted /usb
export DEVICE_UNENCRYPTED_ROOT_NAME=cryptroot
export DEVICE_UNENCRYPTED_ROOT=/dev/mapper/${DEVICE_UNENCRYPTED_ROOT_NAME}
export ENCRYPTION_KEY_PATH=mount/encryption-keys/lappy.key
parted /dev/${DEVICE_ROOT} -- mklabel gpt nix develop
parted /dev/${DEVICE_ROOT} -- mkpart ESP fat32 1MiB 512MiB mk-lappy-ssd /dev/nvme0n1 /usb/encryption-keys/lappy.key
parted /dev/${DEVICE_ROOT} -- mkpart primary 620MiB -1MiB
parted /dev/${DEVICE_ROOT} -- set 1 esp on
parted /dev/${DEVICE_ROOT} -- name 1 nixboot
parted /dev/${DEVICE_ROOT} -- name 2 nixos_encrypted
mkfs.fat -n nixboot ${DEVICE_BOOT_PART}
cryptsetup luksFormat ${DEVICE_ENCRYPTED_ROOT_PART}
cryptsetup luksAddKey ${DEVICE_ENCRYPTED_ROOT_PART} ${ENCRYPTION_KEY_PATH}
cryptsetup luksOpen ${DEVICE_ENCRYPTED_ROOT_PART} ${DEVICE_UNENCRYPTED_ROOT_NAME}
mkfs.ext4 -L nixos ${DEVICE_UNENCRYPTED_ROOT}
``` ```
## SSH Key ## SSH Key
unbase64 it from vault unbase64 it from vault