mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-09-11 12:15:29 +03:00
Merge pull request #7 from zimbatm/make-gce
add make-gce: make Google Compute Engine image
This commit is contained in:
commit
400b73364a
@ -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
|
||||
|
5
bin/make-gce
Executable file
5
bin/make-gce
Executable file
@ -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
lib/gce.nix
Normal file
7
lib/gce.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${toString modulesPath}/virtualisation/google-compute-image.nix"
|
||||
<nixcfg>
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user