feat: add dotfiles support
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0cf60f2942
commit
afd4540dc7
1 changed files with 27 additions and 8 deletions
|
@ -44,6 +44,19 @@ variable "private_network_id" {
|
|||
default = ""
|
||||
}
|
||||
|
||||
data "coder_parameter" "dotfiles_uri" {
|
||||
name = "dotfiles_uri"
|
||||
display_name = "Dotfiles URI"
|
||||
description = <<-EOF
|
||||
Dotfiles repo URI (optional)
|
||||
|
||||
see https://dotfiles.github.io
|
||||
EOF
|
||||
|
||||
default = ""
|
||||
mutable = true
|
||||
}
|
||||
|
||||
data "coder_parameter" "instance_location" {
|
||||
name = "instance_location"
|
||||
display_name = "Instance location"
|
||||
|
@ -251,6 +264,12 @@ data "coder_workspace" "me" {
|
|||
resource "coder_agent" "dev" {
|
||||
arch = "amd64"
|
||||
os = "linux"
|
||||
|
||||
startup_script = data.coder_parameter.dotfiles_uri.value != "" ? "coder dotfiles -y ${data.coder_parameter.dotfiles_uri.value}" : null
|
||||
|
||||
env = {
|
||||
DOCKER_HOST= data.coder_parameter.install_podman.value == "true" ? "unix:///run/user/1000/podman/podman.sock" : "unix:///var/run/docker.sock"
|
||||
}
|
||||
}
|
||||
|
||||
resource "coder_app" "code-server" {
|
||||
|
|
Loading…
Reference in a new issue