NixOS AWS AMI: Configure Grub's serial console

See:

* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking-os.html
* https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/grub.html

Changed files
+5
nixos
modules
virtualisation
+5
nixos/modules/virtualisation/amazon-image.nix
···
boot.loader.grub.efiSupport = cfg.efi;
boot.loader.grub.efiInstallAsRemovable = cfg.efi;
boot.loader.timeout = 1;
+
boot.loader.grub.extraConfig = ''
+
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
+
terminal_output console serial
+
terminal_input console serial
+
'';
boot.initrd.network.enable = true;