diff options
Diffstat (limited to 'users/wpcarro')
-rw-r--r-- | users/wpcarro/terraform/gcp.tf | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/users/wpcarro/terraform/gcp.tf b/users/wpcarro/terraform/gcp.tf index a902f53e7360..92af096953cb 100644 --- a/users/wpcarro/terraform/gcp.tf +++ b/users/wpcarro/terraform/gcp.tf @@ -23,7 +23,7 @@ resource "google_compute_instance" "default" { initialize_params { size = 10 - image = "nixos-20-03" + image = "projects/nixos-cloud/global/images/nixos-image-20-09-3531-3858fbc08e6-x86-64-linux" } } @@ -31,13 +31,16 @@ resource "google_compute_instance" "default" { network = "default" subnetwork = "default" - access_config { - public_ptr_domain_name = "wpcarro.dev" - } + access_config {} } metadata = { - enable-oslogin = "TRUE" + # sshKeys is deprecated, but the GCE NixOS image relies on it, so we need + # both values: + # - deprecation: https://cloud.google.com/compute/docs/metadata/default-metadata-values + # - NixOS bug: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/fetch-instance-ssh-keys.bash#L14 + ssh-keys = "wpcarro:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJkNQJBXekuSzZJ8+gxT+V1+eXTm3hYsfigllr/ARXkf wpcarro@gmail.com" + sshKeys = "wpcarro:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJkNQJBXekuSzZJ8+gxT+V1+eXTm3hYsfigllr/ARXkf wpcarro@gmail.com" } service_account { |