1# Amazon images 2 3AMIs are regularly uploaded from Hydra. This automation lives in 4https://github.com/NixOS/amis 5 6 7## How to upload an AMI for testing 8 9If you want to upload an AMI from changes in a local nixpkgs checkout. 10 11```bash 12nix-build nixos/release.nix -A amazonImage 13 14export AWS_REGION=us-west-2 15export AWS_PROFILE=my-profile 16nix run nixpkgs#upload-ami -- --image-info ./result/nix-support/image-info.json 17``` 18 19## How to build your own NixOS config into an AMI 20 21Use `nixos-rebuild build-image` as follows: 22 23```bash 24NIXOS_CONFIG="$(pwd)/my-config.nix" nixos-rebuild build-image --image-variant amazon 25 26export AWS_REGION=us-west-2 27export AWS_PROFILE=my-profile 28nix run github:NixOS/amis#upload-ami -- --image-info ./result/nix-support/image-info.json 29``` 30 31## Roadmap 32 33* @arianvp is planning to drop zfs support unless someone else picks it up 34* @arianvp is planning to rewrite the image builder to use the repart-based image builder. 35* @arianvp is planning to perhaps rewrite `upload-ami` to use coldnsap 36* @arianvp is planning to move `upload-ami` tooling into nixpkgs once it has stabilized. And only keep the Github Action in separate repo