122 Commits
Author SHA1 Message Date
Arian van PuttenandGitHub 5b088487cb Revert "nixos/amazon-image: default to raw format instead of vpc" 2026-04-18 16:44:43 +01:00
Niko Klanecek 23d4ad8970 nixos/amazon-image: default to raw format instead of vpc
With the move to EBS Direct API uploads (PutSnapshotBlock), raw images
can be uploaded directly without conversion, making the qemu-img vpc
conversion step unnecessary.

This avoids a build-time format conversion and simplifies upload
workflows that use the EBS Direct API (e.g. NixOS/amis#364).
2026-04-16 09:30:10 -06:00
edef 323d269a24 nixos/amazon: move nvme_core.io_timeout to runtime module
This kernel parameter was accidentally added to the image builder module
in 2018 (e4777ae2d8) when it should have been in the runtime config.
This causes a mismatch between AMIs built with the builder and systems
configured with just the runtime module.

Move it to modules/virtualisation/amazon-image.nix so that all EC2
instances get the recommended NVMe timeout, regardless of how they
were provisioned.
2026-01-11 00:07:19 +00:00
Robert Hensing 8146763574 nixos/ec2-data.nix: Print whole host pubkeys
This prints the whole host public keys in the same format as cloud-init.
The main benefit is that this allows the direct generation of a known_hosts
file, simplifying client setup.

This commit also provides a new NixOS test that's an alternative to the
currently broken nixos/tests/ec2.nix tests.
2025-12-23 13:41:44 +01:00
phaerandPhilip Taron 8cbc6d6da6 amazon-image: fix image.extension value for vpc/vhd files
vpc files use the extension "vhd". `make-disk-image-nix` contains a
lookup table, but does not expose that. vpc is the only format
supported by the amazon image which is affected. Format and extension
are the same for raw and qcow2.
2025-07-18 11:12:08 -07:00
phaer 813d0ba1fb amazon-image: Increase diskSize 3 -> 4GB
Disk usage of the image has risen considerably since last release. We
still need to investigate the cause in detail. Increasing it for now
prevents build failures at least.
2025-05-19 12:53:40 +02:00
phaer 8ccd7e5d9a amazon-image: Remove tags from label, use version only
By default, `system.nixos.label` includes `system.nixos.tags` which
historically was not set for the amazon image.

Keeping the tag in the label of the generated disk image inside the
derivation (i.e. `image.filePath`) makes it easier to tell that the
file is for amazon (i.e.
`nixos-image-amazon-25.11pre-git-x86_64-linux.vpc`) while the "label"
in `image-info.json` for users of the AWS api stays stable (i.e.
`/25.05pre-git-x86_64-linux`).

`
2025-05-19 12:53:40 +02:00
phaer fdb144fb41 ec2/amazon-image: use system.build.image
and rename:
- amazonImage.name -> image.baseName
2024-12-16 15:35:21 +01:00
phaer 44520c1a05 amazon-image: update nixos-generators reference in README.md 2024-12-16 00:40:59 +01:00
phaer c6da9ef32d modules/virtualisation: add unified diskSize opt
See https://github.com/NixOS/nixpkgs/pull/339535 and https://github.com/NixOS/nixpkgs/pull/341058
2024-10-27 12:28:37 +01:00
phaer 88b285c01d nixos/virtualisation: format image-related files 2024-10-18 13:32:50 +02:00
Martin WeineltandGitHub 4cec81a995 Revert "modules/virtualisation: add shared options, merge various diskSize options" (#340894)
Breaks evaluation of all nixos tests, and is therefore a channel blocker.
2024-09-10 03:12:55 +02:00
phaer 759de4c54d amazon-image: sizeMB -> virtualisation.diskSize 2024-09-05 15:56:25 +02:00
phaer 04fadac429 run nixfmt-rfc-style 2024-09-05 15:56:22 +02:00
Philip Taron 3ba72e2834 nixos/amazon-image: avoid top-level with statements in maintainers script 2024-07-15 22:02:39 -07:00
SandroandGitHub 729002e6ce Merge pull request #264635 from baloo/baloo/amazon-image/pkg-reimport 2024-06-02 23:42:06 +02:00
Arian van Putten a48cd7d56f nixos/amazon-image: Drop create-amis.sh script and update docs
We replaced this with automation in https://github.com/NixOS/amis

Also add some docs how you can build the image yourself
2024-05-25 10:01:02 +02:00
Arthur Gautier 69c2090e98 amazon-image: allow pkgs overrides
By reimporting pkgs this drops overlays.

This reverts 0d3738cdcc
(`Fix the EC2 test`). Reasoning behind the reimport is blurry to me.
2024-05-09 09:48:07 -07:00
stuebinmandJonathan Ringer 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Arian van Putten a1232992ac nixos/amazon-image: Take over maintainership
I am actively working on bringing back Amazon Images for 24.05.
Please track progress in https://github.com/nixos/amis
2024-02-09 18:02:40 +01:00
Robert Hensing 4d1f62836e scripts/create-amis.sh: Update region list 2023-12-05 18:30:52 +01:00
K900 a3dc53e3fc nixos/amazon-image: embiggen
aarch64 no longer fits in 2GB, blocking channel updates
2023-06-07 08:42:47 +03:00
figsoda a31ca7f220 maintainers/scripts: fix typos 2023-05-19 22:31:04 -04:00
Raito Bezarius f9c4838812 maintainers/scripts/ec2/amazon-image: use qemu_kvm (host arch) instead of qemu (all arches) 2023-04-28 23:51:07 +02:00
Linus Heckemann 24e33a4d2e nixos/ec2: remove paravirtualization-specific code
Paravirtualized EC2 instances haven't been supported since 2017.
It's safe to remove this now.
2022-11-23 17:18:18 +01:00
pennae bd56368848 nixos/*: md-convert hidden plaintext options
most of these are hidden because they're either part of a submodule that
doesn't have its type rendered (eg because the submodule type is used in
an either type) or because they are explicitly hidden. some of them are
merely hidden from nix-doc-munge by how their option is put together.
2022-08-31 16:32:54 +02:00
Armando Santos fdf74c7741 maintainers/create-amis.sh: Add more AWS regions
Add all currently available AWS regions
2022-05-17 10:20:30 +01:00
Graham Christensen a8f41adbb7 amazon-image: use make-multi-disk-zfs-image 2022-04-07 15:28:28 -04:00
Timothy DeHerrera f0aec20cd7 create-amis.sh: possible deprecation 2021-11-11 09:04:29 -07:00
Timothy DeHerrera ed4170733c amis: enable setting ami boot mode on registration
This is important since legacy bios mode is still the default for Intel
and AMD based instances on AWS. That is, even if your image is setup to
use UEFI on the OS level, the AMI will still use BIOS unless the boot
mode is explicitly set during registration.
2021-11-10 17:38:58 -07:00
Timothy DeHerreraandJonathan Ringer 4d765caecd create_amis.sh: fix logic for non-zfs amis 2021-11-09 15:56:04 -08:00
Robert HensingandGitHub 0699530f08 Merge pull request #136909 from ncfavier/cleanup-defaults-examples
nixos/doc: clean up defaults and examples
2021-10-04 20:37:42 +02:00
Naïm Favier 2ddc335e6f nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Timothy DeHerreraandJonathan Ringer 1c0a20efcf create-amis.sh: fix typo 2021-10-03 19:03:28 -07:00
Timothy DeHerreraandJonathan Ringer 2d67b946b7 create-amis.sh: use status message
The progress ID is fairly useless. Status message is more useful for
humans.
2021-10-03 19:03:28 -07:00
Timothy DeHerreraandJonathan Ringer 407998d15a create-amis.sh: add support for the ZFS AMIs 2021-10-03 19:03:28 -07:00
Timothy DeHerreraandJonathan Ringer 1ff82fec9a create-amis.sh: allow uploading private AMIs 2021-10-03 19:03:28 -07:00
Timothy DeHerreraandJonathan Ringer 0543f2d2f6 create-amis.sh: make vars overridable from env 2021-10-03 19:03:28 -07:00
Graham Christensen 71b3d18181 amazon images: extend the image-info.json to have a disks object
Having a disks object with a dictionary of all the disks and their
properties makes it easier to process multi-disk images.

Note the rename of `label` to `system_label` is because `$label`i
is something of a special token to jq.
2021-08-25 10:42:35 -04:00
Graham Christensen bd38b059ea NixOS/amazonImageZfs: init
Introduce an AWS EC2 AMI which supports aarch64 and x86_64 with a ZFS
root.

This uses `make-zfs-image` which implies two EBS volumes are needed
inside EC2, one for boot, one for root. It should not matter which
is identified `xvda` and which is `xvdb`, though I have always
uploaded `boot` as `xvda`.
2021-08-25 10:42:35 -04:00
Luke Granger-Brown 87c3b7e767 amazonImage: make statically sized again
For reasons we haven't been able to work out, the aarch64 EC2 image now
regularly exceeds the output image size on hydra.nixos.org. As a
workaround, set this back to being statically sized again.

The other images do seem to build - it's just a case of the EC2 image
now being too large (occasionally non-determinstically).
2021-05-01 02:19:42 +00:00
lassulusandSamuel Dionne-Riel 5aa4273e4f treewide: use auto diskSize for make-disk-image
(cherry picked from commit f3aa040bcb)
2021-04-24 14:49:07 -04:00
Luke Granger-Brown 4fb91cbafe Revert "treewide: use auto diskSize for make-disk-image"
This reverts commit f3aa040bcb.
2021-04-24 02:38:36 +00:00
Luke Granger-Brown f521b12b0e Revert "nixos/amazon-image: (temporarily) use fixed disk size again"
This reverts commit 6a8359a92a.
2021-04-24 02:38:25 +00:00
Luke Granger-Brown 6a8359a92a nixos/amazon-image: (temporarily) use fixed disk size again
As a temporary workaround for #120473 while the image builder is patched
to correctly look up disk sizes, partially revert
f3aa040bcb for EC2 disk images only.

We retain the type allowing "auto" but set the default back to the
previous value.
2021-04-24 00:43:47 +00:00
lassulus f3aa040bcb treewide: use auto diskSize for make-disk-image 2021-04-22 19:52:49 +02:00
Graham ChristensenandGitHub 7092dd52f8 amazonImage: Upload disks as GP3 for cheaper & faster IO (#109027)
GP3 is always faster and cheaper than GP2, so sticking to GP2 is
leaving money on the table.

https://cloudwiry.com/ebs-gp3-vs-gp2-pricing-comparison/
2021-01-11 13:54:40 -05:00
Graham ChristensenandGitHub 38a394bdee Merge pull request #102174 from grahamc/ami-root-use-gpt
AMI root partition table: use GPT to support >2T partitions
2020-10-30 16:14:37 -04:00
Graham Christensen d77ddf2a40 nixos.amazonAmi: use legacy+gpt disk images to support partitions >2T 2020-10-30 15:50:25 -04:00
74a577b293 create-amis: improve wording around the service name's IAM role
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2020-10-30 12:40:17 -04:00