3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/maintainers/scripts/ec2/ebs-creator.nix
Rob Vermaas 973fa21b52 Better support for HVM instances. Now the NixOS images can
be used on HVM instances without needing nixops. Previously
the grub setup was incorrect, so a plain 'nixos-rebuild switch'
and a reboot would result in a broken system.

Also added growing of the partition of the root disk in the initrd,
so you can run resize2fs after initial boot, without needing an
extra reboot. This is useful especially for nixops'
deployment.ec2.ebsInitialRootDiskSize option.

(cherry picked from commit 044a24e58b)
2014-05-21 16:37:55 +02:00

15 lines
441 B
Nix

{
network.description = "NixOS EBS creator";
machine =
{ config, pkgs, resources, ... }:
{ deployment.targetEnv = "ec2";
deployment.ec2.instanceType = "c3.large";
deployment.ec2.securityGroups = [ "admin" ];
deployment.ec2.ebsBoot = false;
deployment.ec2.keyPair = resources.ec2KeyPairs.keypair.name;
deployment.ec2.zone = "us-east-1e";
environment.systemPackages = [ pkgs.parted ];
};
}