forked from mirrors/nixpkgs
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:
parent
bb49391151
commit
63f7456f6a
|
@ -9,6 +9,12 @@ in {
|
||||||
imports = [ ../../../modules/virtualisation/amazon-image.nix ];
|
imports = [ ../../../modules/virtualisation/amazon-image.nix ];
|
||||||
|
|
||||||
options.amazonImage = {
|
options.amazonImage = {
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The name of the generated derivation";
|
||||||
|
default = "nixos-disk-image";
|
||||||
|
};
|
||||||
|
|
||||||
contents = mkOption {
|
contents = mkOption {
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
[ { source = pkgs.memtest86 + "/memtest.bin";
|
[ { source = pkgs.memtest86 + "/memtest.bin";
|
||||||
|
@ -38,7 +44,7 @@ in {
|
||||||
|
|
||||||
config.system.build.amazonImage = import ../../../lib/make-disk-image.nix {
|
config.system.build.amazonImage = import ../../../lib/make-disk-image.nix {
|
||||||
inherit lib config;
|
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
|
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
|
||||||
partitioned = config.ec2.hvm;
|
partitioned = config.ec2.hvm;
|
||||||
diskSize = cfg.sizeMB;
|
diskSize = cfg.sizeMB;
|
||||||
|
|
Loading…
Reference in a new issue