pull/45/head
Muhammad Atif Ali 2 years ago
parent 62c00aa1d4
commit a618e5cef6

@ -17,7 +17,7 @@ variable "agent_id" {
variable "extensions" {
type = list(string)
description = "A list of extensions to install."
default = [ ]
default = []
}
variable "port" {
@ -55,12 +55,12 @@ resource "coder_script" "code-server" {
display_name = "code-server"
icon = "/icon/code.svg"
script = templatefile("${path.module}/run.sh", {
EXTENSIONS: join(",", var.extensions),
PORT: var.port,
LOG_PATH: var.log_path,
INSTALL_PREFIX: var.install_prefix,
EXTENSIONS : join(",", var.extensions),
PORT : var.port,
LOG_PATH : var.log_path,
INSTALL_PREFIX : var.install_prefix,
// This is necessary otherwise the quotes are stripped!
SETTINGS: replace(jsonencode(var.settings), "\"", "\\\""),
SETTINGS : replace(jsonencode(var.settings), "\"", "\\\""),
})
run_on_start = true
}

@ -21,7 +21,7 @@ data "coder_parameter" "dotfiles_uri" {
default = ""
description = "Enter a URL for a [dotfiles repository](https://dotfiles.github.io) to personalize your workspace"
mutable = true
icon = "https://raw.githubusercontent.com/jglovier/dotfiles-logo/main/dotfiles-logo-icon.svg"
icon = "/icon/dotfiles.svg"
}
resource "coder_script" "personalize" {
@ -33,6 +33,6 @@ resource "coder_script" "personalize" {
fi
EOT
display_name = "Dotfiles"
icon = "https://raw.githubusercontent.com/jglovier/dotfiles-logo/main/dotfiles-logo-icon.svg"
icon = "/icon/dotfiles.svg"
run_on_start = true
}

@ -30,8 +30,8 @@ resource "coder_script" "git_clone" {
display_name = "Git Clone"
icon = "/icons/git.svg"
script = templatefile("${path.module}/run.sh", {
CLONE_PATH: var.path != "" ? var.path : join("/", ["~", basename(var.url)]),
REPO_URL: var.url,
CLONE_PATH : var.path != "" ? var.path : join("/", ["~", basename(var.url)]),
REPO_URL : var.url,
})
run_on_start = true
}

@ -29,10 +29,10 @@ variable "log_path" {
resource "coder_script" "personalize" {
agent_id = var.agent_id
script = templatefile("${path.module}/run.sh", {
PERSONALIZE_PATH: var.path,
PERSONALIZE_PATH : var.path,
})
display_name = "Personalize"
icon = "/emojis/1f58c.png"
icon = "/icon/personalize.svg"
log_path = var.log_path
run_on_start = true
}

Loading…
Cancel
Save