-
Choose the passphrase for the storage
echo -n "passphrase" > /tmp/cryptroot.key
-
Partition the disc, be careful to substitute the
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko --write-efi-boot-entries --flake 'github:brusapa/nix-config#<host>'
-
Install NixOS, be careful to substitute the
sudo nixos-install --root /mnt --flake 'github:brusapa/nix-config#<host>'
-
Set the secure boot on the BIOS on setup mode
-
Create secure boot the keys
# sbctl create-keys
-
Enroll the keys
# sbctl enroll-keys -- --microsoft
-
Reboot and verify
$ bootctl status System: Firmware: UEFI 2.80 (American Megatrends 5.27) Firmware Arch: x64 Secure Boot: enabled (user) TPM2 Support: yes Measured UKI: yes Boot into FW: supported
-
Store the keys on the TPM module (you may have to change the last parameter to point to your encrypted root partition):
# systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+7+12 --wipe-slot=tpm2 /dev/nvme0n1p2
$ cd ~/.ssh
$ ssh-keygen -K
$ mv id_ed25519_sk_* id_ed25519_sk
# tailscale up
# sensors-detect --auto