From d2ff42560f84c3790221d2f71798706b64bf1204 Mon Sep 17 00:00:00 2001 From: M Atif Ali Date: Fri, 24 Jan 2025 20:17:18 +0500 Subject: [PATCH] chore(dogfood): dogfood zed editor (#16255) This requires running `coder config-ssh`. I intentially kept it as a module so that we can port it to `coder/`modules` easily when needed. --- dogfood/contents/main.tf | 7 +++++++ dogfood/contents/zed/main.tf | 28 ++++++++++++++++++++++++++++ site/src/theme/icons.json | 3 ++- site/static/icon/zed.svg | 15 +++++++++++++++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 dogfood/contents/zed/main.tf create mode 100644 site/static/icon/zed.svg diff --git a/dogfood/contents/main.tf b/dogfood/contents/main.tf index 0d748a23c0..10cc27d4cb 100644 --- a/dogfood/contents/main.tf +++ b/dogfood/contents/main.tf @@ -189,6 +189,13 @@ module "cursor" { folder = local.repo_dir } +module "zed" { + count = data.coder_workspace.me.start_count + source = "./zed" + agent_id = coder_agent.dev.id + folder = local.repo_dir +} + resource "coder_agent" "dev" { arch = "amd64" os = "linux" diff --git a/dogfood/contents/zed/main.tf b/dogfood/contents/zed/main.tf new file mode 100644 index 0000000000..4eb63f7d48 --- /dev/null +++ b/dogfood/contents/zed/main.tf @@ -0,0 +1,28 @@ +terraform { + required_version = ">= 1.0" + required_providers { + coder = { + source = "coder/coder" + version = ">= 0.17" + } + } +} + +variable "agent_id" { + type = string +} + +variable "folder" { + type = string +} + +data "coder_workspace" "me" {} + +resource "coder_app" "zed" { + agent_id = var.agent_id + display_name = "Zed Editor" + slug = "zed" + icon = "/icon/zed.svg" + external = true + url = "zed://ssh/coder.${lower(data.coder_workspace.me.name)}/${var.folder}" +} diff --git a/site/src/theme/icons.json b/site/src/theme/icons.json index 241248f09c..3d63b9ac81 100644 --- a/site/src/theme/icons.json +++ b/site/src/theme/icons.json @@ -94,5 +94,6 @@ "ubuntu.svg", "vault.svg", "webstorm.svg", - "widgets.svg" + "widgets.svg", + "zed.svg" ] diff --git a/site/static/icon/zed.svg b/site/static/icon/zed.svg new file mode 100644 index 0000000000..f4bef5af16 --- /dev/null +++ b/site/static/icon/zed.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +