Skip to content

Commit

Permalink
amazon-image: make derivation name configurable
Browse files Browse the repository at this point in the history
I'm getting dozens of nixos-disk-image entries in my store and it's
getting hard to track :)
  • Loading branch information
copumpkin committed Oct 23, 2017
1 parent bb49391 commit 63f7456
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nixos/maintainers/scripts/ec2/amazon-image.nix
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 63f7456

Please sign in to comment.