summaryrefslogtreecommitdiffstats
path: root/nixos/release.nix
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2019-06-01 02:23:30 +0900
committerAndrew Childs <lorne@cons.org.nz>2019-09-05 00:52:20 +0900
commit9898fd0e8e47c21a0206b2298ded0f99ae494be6 (patch)
tree741a06c94b715c40599cf25d7eec8dd8d47da987 /nixos/release.nix
parent027e5560bd8de81ea839d48bea763634b3be1217 (diff)
nixos/release.nix: add "amazonImage" for building Amazon EC2 Images
Diffstat (limited to 'nixos/release.nix')
-rw-r--r--nixos/release.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/release.nix b/nixos/release.nix
index df2c52ccd0b6..c7c609658909 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -196,6 +196,22 @@ in rec {
);
+ # A disk image that can be imported to Amazon EC2 and registered as an AMI
+ amazonImage = forMatchingSystems [ "x86_64-linux" "aarch64-linux" ] (system:
+
+ with import nixpkgs { inherit system; };
+
+ hydraJob ((import lib/eval-config.nix {
+ inherit system;
+ modules =
+ [ versionModule
+ ./maintainers/scripts/ec2/amazon-image.nix
+ ];
+ }).config.system.build.amazonImage)
+
+ );
+
+
# Ensure that all packages used by the minimal NixOS config end up in the channel.
dummy = forAllSystems (system: pkgs.runCommand "dummy"
{ toplevel = (import lib/eval-config.nix {