Skip to content

Commit

Permalink
Merge pull request nix-community#7 from zimbatm/make-gce
Browse files Browse the repository at this point in the history
add make-gce: make Google Compute Engine image
  • Loading branch information
Lassulus authored Jan 15, 2019
2 parents 6bf7e8c + 4895619 commit 400b733
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ it echoes the path to a iso image, which you then can flash onto an usb-stick or

we currently have following generators:

format | script
--- | ---
format | script | description
--- | --- | ---
gce | bin/make-gce | Google Compute Image
iso | bin/make-iso
kexec | bin/make-kexec
kexec-bundle | bin/make-kexec-bundle
Expand Down
5 changes: 5 additions & 0 deletions bin/make-gce
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
CONFIG=${1:-config.nix}
shift
out=$(nix-build --no-out-link '<nixpkgs/nixos>' -A config.system.build.googleComputeImage -I nixos-config=lib/gce.nix -I nixcfg=${CONFIG} "$@" )
echo "$out"/*.tar.gz
7 changes: 7 additions & 0 deletions lib/gce.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ modulesPath, ... }:
{
imports = [
"${toString modulesPath}/virtualisation/google-compute-image.nix"
<nixcfg>
];
}

0 comments on commit 400b733

Please sign in to comment.