Build an NixOS AMI with Packer and deploy an EC2 instance with Terraform.
packer init .
packer build .
Packer key pair generation has some issues, so you may need to manually create an ED25519 key pair on AWS and save the private key to ./packer/packer-key.pem
terraform init
terraform apply