about summary refs log tree commit diff
path: root/corp/ops/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-04-21T16·56+0300
committertazjin <tazjin@tvl.su>2023-04-24T10·56+0000
commit6daf91c9cd52b729483aca6e1eaafc50fd796e7f (patch)
tree430e93bfd058a5500ddb81f2991b9e86cd24977e /corp/ops/default.nix
parentc7392b3c6b99bffb06965c81c7bf273371ce813e (diff)
feat(corp/ops): add NixOS profile for Yandex Cloud machines r/6111
Sets up a virtual machine image that is bootable on Yandex Cloud.

There are some slightly wonky behaviours still, like cloud-init
apparently putting all keys into root's authorized_keys no matter what
is specified in the metadata, but it does work now.

Change-Id: I57dcb7fcfa6872a28855dc1347f73a6db3c56828
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8496
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'corp/ops/default.nix')
-rw-r--r--corp/ops/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/corp/ops/default.nix b/corp/ops/default.nix
index 87f71da7860c..dfa62c80bafc 100644
--- a/corp/ops/default.nix
+++ b/corp/ops/default.nix
@@ -34,4 +34,13 @@ depot.nix.readTree.drvTargets rec {
 
     yc.attr = "corp.ops.yc-cli";
   };
+
+  # Base image for Yandex VMs.
+  yandex-base-image = (depot.third_party.nixos {
+    configuration = { ... }: {
+      imports = [
+        (depot.path.origSrc + ("/corp/ops/modules/yandex-cloud.nix"))
+      ];
+    };
+  }).config.system.build.yandexCloudImage;
 }