Skip to content

Instantly share code, notes, and snippets.

@dhess
Created March 16, 2020 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhess/f5e356ddb2c8544b43d45cef9ca349de to your computer and use it in GitHub Desktop.
Save dhess/f5e356ddb2c8544b43d45cef9ca349de to your computer and use it in GitHub Desktop.
self: super:
let
mkEC2Image = format: (import (super.path + "/nixos/lib/eval-config.nix") {
system = "x86_64-linux";
modules =
[
(super.path + "/nixos/maintainers/scripts/ec2/amazon-image.nix")
{
ec2.hvm = true;
amazonImage.format = format;
# your custom config here.
}
];
}).config.system.build.amazonImage;
ec2-image = super.recurseIntoAttrs {
qcow2 = mkEC2Image "qcow2";
vhd = mkEC2Image "vpc";
};
in
{
inherit ec2-image;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment