Talk: Install NixOS on Amazon EC2
From NixOS Wiki
The article is quite outdated. This page is undergoing significant updates. Current techniques can be found in:
http://jackkelly.name/blog/archives/2020/08/30/building_and_importing_nixos_amis_on_ec2/