This terraform module creates a new image in the Google Cloud project using a public tarballs of a NixOS release. Those tarballs are released by the NixOS project.
Since image names are unique, only one instance per version of the module is supported per Google Cloud project.
module"nixos_image_1809" { source="github.com/tweag/terraform-nixos/google_image_nixos"nixos_version="18.09" } resource"google_compute_instance""example" { name="example"machine_type="n1-standard-1"zone="us-central1-a"boot_disk { initialize_params { image=module.nixos_image_1809.self_link } } network_interface { network="default" } }
A new configuration.nix can be passed trough the userdata. Here is the default configuration to expand upon:
{modulesPath, ... }: {imports=["${toStringmodulesPath}/virtualisation/google-compute-image.nix"];}
Run the ./update-url-map
script to fetch new image releases. Please submit a PR as well!
Name | Version |
---|---|
n/a |
Name | Description |
---|---|
self_link | Link to the NixOS Compute Image |