nova-image: add amazon-init module to the nova image

This allows the VM to provide a `configuration.nix` file to the VM.

The test doesn't work in sandbox because it needs Internet (however it
works interactively).
This commit is contained in:
Antoine Eiche
2019-01-28 14:44:41 +01:00
parent 2858b35100
commit 849460f878
2 changed files with 32 additions and 7 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ with lib;
../profiles/headless.nix
# The Openstack Metadata service exposes data on an EC2 API also.
./ec2-data.nix
./amazon-init.nix
];
config = {
@@ -32,7 +33,7 @@ with lib;
path = [ pkgs.wget ];
description = "Fetch Metadata on startup";
wantedBy = [ "multi-user.target" ];
before = [ "apply-ec2-data.service" ];
before = [ "apply-ec2-data.service" "amazon-init.service"];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
script =