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
## Filesystems
```
export DEVICE_ROOT=/dev/nvme0n1
export DEVICE_BOOT_PART=${DEVICE_ROOT}p1
export DEVICE_ENCRYPTED_ROOT_PART=${DEVICE_ROOT}p2
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
mkdir /usb
cryptsetup luksOpen /dev/disk/by-partname/usb usb_unencrypted
mount /dev/mapper/usb_unencrypted /usb
parted /dev/${DEVICE_ROOT} -- mklabel gpt
parted /dev/${DEVICE_ROOT} -- mkpart ESP fat32 1MiB 512MiB
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}
nix develop
mk-lappy-ssd /dev/nvme0n1 /usb/encryption-keys/lappy.key
```
## SSH Key
unbase64 it from vault