simplify filesystems on setup guide
This commit is contained in:
parent
ad79d05d08
commit
50f2a36c1b
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue