{"id":30071013,"url":"https://github.com/NixOS/amis","last_synced_at":"2025-08-08T12:08:17.289Z","repository":{"id":209004671,"uuid":"723001797","full_name":"NixOS/amis","owner":"NixOS","description":"Home for NixOS AMI automation","archived":false,"fork":false,"pushed_at":"2025-08-05T00:41:03.000Z","size":421,"stargazers_count":65,"open_issues_count":18,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-05T02:31:57.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nixos.github.io/amis/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NixOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"nixos"}},"created_at":"2023-11-24T12:54:23.000Z","updated_at":"2025-08-04T13:58:17.000Z","dependencies_parsed_at":"2023-11-24T13:45:47.964Z","dependency_job_id":"e093ea1e-1c14-44b6-b691-f4e846bf720e","html_url":"https://github.com/NixOS/amis","commit_stats":{"total_commits":208,"total_committers":6,"mean_commits":"34.666666666666664","dds":0.1923076923076923,"last_synced_commit":"d4a56fc853c3223f7e0a90f23205f18f2982a368"},"previous_names":["arianvp/amis","nixos/amis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NixOS/amis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Famis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Famis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Famis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Famis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NixOS","download_url":"https://codeload.github.com/NixOS/amis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NixOS%2Famis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269417542,"owners_count":24413384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-08T12:07:57.470Z","updated_at":"2025-08-08T12:08:16.947Z","avatar_url":"https://github.com/NixOS.png","language":"Python","funding_links":["https://opencollective.com/nixos"],"categories":["DevOps"],"sub_categories":[],"readme":"# NixOS AMIs\n\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/NixOS/amis/badge)](https://scorecard.dev/viewer/?uri=github.com/NixOS/amis)\n\n[Join our Matrix Channel!](https://matrix.to/#/#aws:nixos.org)\n\nGithub Action that regularly uploads AMIs for release channels\n\n## Can I use this to upload custom AMIs?\n\nYes! for example with a config like this:\n\n```nix\n{\n  inputs.nixpkgs.url = \"github:NixOS/nixpkgs/nixos-unstable\";\n\n  outputs = { nixpkgs, ... }: {\n    nixosConfigurations.my-system = nixpkgs.lib.nixosSystem {\n      modules = [\n        \"${nixpkgs}/nixos/maintainers/scripts/ec2/amazon-image.nix\"\n        {\n          virtualisation.diskSize = \"auto\";  # or gigabytes. default is 3 * 1024\n          nixpkgs.hostPlatform = \"x86_64-linux\";\n          services.nginx.enable = true;\n        }\n      ];\n    };\n  };\n}\n```\n\nyou can upload it to your account like this:\n\n```bash\nnix build .#nixosConfigurations.my-system.config.system.build.amazonImage\nnix run github:NixOS/amis#upload-ami -- --prefix my-system --s3-bucket my-bucket --image-info ./result/nix-support/image-info.json\n```\n\n## Setting up account\n\nSome steps need to be done manually to set up the account.  This is a one time\nprocess. These are hard to automate with Terraform.\n\nFirst opt in to all regions:\n\n```bash\nnix run .#enable-regions\n```\n\nYou might get rate-limited so need to wait and rerun until all finish:\n```\nbotocore.errorfactory.TooManyRequestsException: An error occurred (TooManyRequestsException) when calling the EnableRegion operation (reached max retries: 4): This request has exceeded the quota for 'Number of concurrent region-opt requests for an account'. Consider retrying the operation later once some requests have been completed.\n```\n\nNow wait until all regions are enabled. You can use:\n```\naws account list-regions --region-opt-status-contains ENABLING\n```\n\nThen request a quota increase for the number of AMIs you want to publish.\nThis will create support tickets in all regions.  You can check the status\nof the tickets in the AWS console. It might take a few days for the tickets\nto be resolved.\n\n```bash\nnix run .#request-public-ami-quota-increase -- --desired-value 1000\n```\n\nFinally enable public AMIs:\n\n```bash\nnix run .#disable-image-block-public-access\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNixOS%2Famis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNixOS%2Famis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNixOS%2Famis/lists"}