forked from mirrors/nixpkgs
ab0ddac8f9
Since they're resized on first boot anyway, they don't need to be big.
28 lines
625 B
Nix
28 lines
625 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
imports =
|
|
[ ../../../modules/installer/cd-dvd/channel.nix
|
|
../../../modules/virtualisation/amazon-image.nix
|
|
];
|
|
|
|
system.build.amazonImage = import ../../../lib/make-disk-image.nix {
|
|
inherit pkgs lib config;
|
|
partitioned = config.ec2.hvm;
|
|
diskSize = if config.ec2.hvm then 2048 else 8192;
|
|
configFile = pkgs.writeText "configuration.nix"
|
|
''
|
|
{
|
|
imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ];
|
|
${optionalString config.ec2.hvm ''
|
|
ec2.hvm = true;
|
|
''}
|
|
}
|
|
'';
|
|
};
|
|
|
|
}
|