amazon-image: make derivation name configurable

I'm getting dozens of nixos-disk-image entries in my store and it's
getting hard to track :)
This commit is contained in:
Dan Peebles 2017-10-23 16:22:16 -04:00
parent bb49391151
commit 63f7456f6a

View file

@ -9,6 +9,12 @@ in {
imports = [ ../../../modules/virtualisation/amazon-image.nix ];
options.amazonImage = {
name = mkOption {
type = types.str;
description = "The name of the generated derivation";
default = "nixos-disk-image";
};
contents = mkOption {
example = literalExample ''
[ { source = pkgs.memtest86 + "/memtest.bin";
@ -38,7 +44,7 @@ in {
config.system.build.amazonImage = import ../../../lib/make-disk-image.nix {
inherit lib config;
inherit (cfg) contents format;
inherit (cfg) contents format name;
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
partitioned = config.ec2.hvm;
diskSize = cfg.sizeMB;