Skip to content

Instantly share code, notes, and snippets.

@dhess
Created February 29, 2020 14:04
Show Gist options
  • Save dhess/6369074e5b877ba7e49aa91e1f14b02e to your computer and use it in GitHub Desktop.
Save dhess/6369074e5b877ba7e49aa91e1f14b02e 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";
pkgs = self;
modules =
super.lib.hacknix.modules ++
[
(super.path + "/nixos/maintainers/scripts/ec2/amazon-image.nix")
{
ec2.hvm = true;
amazonImage.format = format;
hacknix.defaults.enable = true;
}
];
}).config.system.build.amazonImage;
hackworth-ec2-image = super.recurseIntoAttrs {
qcow2 = mkEC2Image "qcow2";
vhd = mkEC2Image "vpc";
};
in {
inherit hackworth-ec2-image;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment