2 ms·
Yes. NixOS can be set up to output a ready-to-run AMI with your customizations, as well as any other kind of image. For example, there are official binaries at
by Nullabillity 9y ago
Yes. NixOS can be set up to output a ready-to-run AMI with your customizations, as well as any other kind of image. For example, there are official binaries at https://nixos.org/nixos/download.html https://nixos.org/nixos/download.html, which I believe are built by https://github.com/NixOS/nixpkgs/blob/master/nixos/maintainers/scripts/ec2/create-amis.sh https://github.com/NixOS/nixpkgs/blob/master/nixos/maintaine.... You can then either replace the images as needed, or redeploy in place.
NixOps can also automatically create and destroy EC2 VMs, EBS disks, and so on for you, based on your NixOS config. NixOps also makes it very easy to set up a local copy of your network using Virtualbox.
Personally I use a common baseline image that is preseeded with my SSH key, and then deploy whatever setup I need using NixOps. You can read more about that approach at https://nixos.wiki/wiki/Virtualization_in_NixOS https://nixos.wiki/wiki/Virtualization_in_NixOS.