From 63f7456f6ac63ec03268eb85766153cdb9b6d444 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Mon, 23 Oct 2017 16:22:16 -0400 Subject: [PATCH] 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 :) --- nixos/maintainers/scripts/ec2/amazon-image.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix index d76fb644d029..2e67edf8ee3d 100644 --- a/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -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;