Install NixOS on GCE: Difference between revisions
Install from old wiki |
update example to 24.11 |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
== Bootstrapping a NixOS image from the build of your choice == | == Bootstrapping a NixOS image from the build of your choice == | ||
This assumes you have created a Google Cloud project and a Google Cloud Storage bucket in that project. Set them as variables: | This assumes you have created a Google Cloud project and a Google Cloud Storage bucket that allows public access and uses Fine-grained access control (as opposed to Uniform) in that project. Set them as variables: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 36: | Line 36: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
$ git clone --depth=1 --branch | $ git clone --depth=1 --branch nixos-24.11 https://github.com/NixOS/nixpkgs.git | ||
$ BUCKET_NAME=my_bucket_name nixpkgs/nixos/maintainers/scripts/gce/create-gce.sh | $ BUCKET_NAME=my_bucket_name nixpkgs/nixos/maintainers/scripts/gce/create-gce.sh | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 89: | Line 89: | ||
At this point you may want to snapshot this image and use this snapshot to make future VMs. | At this point you may want to snapshot this image and use this snapshot to make future VMs. | ||
[[Category:Server]][[Category:Cookbook]] | [[Category:Server]][[Category:Cookbook]] | ||
[[Category:Deployment]] |