nixos/amazon.nix
The base Fil-C NixOS (nixos/base.nix) as an Amazon EC2 machine, for the public AMI that .github/workflows/ami.yml registers. Root logs in over SSH with the instance's EC2 key; the serial console logs demo in.
system.build.ami is the VHD to import, built with the native package set like the qcow2, with Nixpkgs' image-info.json beside it.
EC2 names the host otherwise; /etc/nixos/flake.nix names the configuration after it.
ec2-data puts the instance's key in root's authorized_keys.
It turns user data into /etc/nixos/configuration.nix for channels, and brings in git; this machine's configuration is the flake in /etc/nixos.
Instead, user data of the form #filnix FLAKE#CONFIGURATION switches the machine to that configuration once, at first boot, substituting everything (scripts/launch-demo-wiki uses it). #filnix /nix/store/... switches to a system already in the store or a cache. Other user data is ignored.
Switch to the configuration named in the user data
Switching must not stop or restart the unit that runs it.
An 8 GiB volume by default, with room for a rebuild; a bigger volume at launch is grown into.