feat: make shell customizable
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
afd4540dc7
commit
c59097d374
2 changed files with 11 additions and 3 deletions
|
@ -3,7 +3,7 @@ users:
|
||||||
- name: ${username}
|
- name: ${username}
|
||||||
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
||||||
groups: sudo
|
groups: sudo
|
||||||
shell: /bin/bash
|
shell: ${user_shell}
|
||||||
packages:
|
packages:
|
||||||
- zsh
|
- zsh
|
||||||
- git
|
- git
|
||||||
|
|
|
@ -57,6 +57,13 @@ data "coder_parameter" "dotfiles_uri" {
|
||||||
mutable = true
|
mutable = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data "coder_parameter" "user_shell" {
|
||||||
|
name = "user_shell"
|
||||||
|
display_name = "Default Shell"
|
||||||
|
default = "/usr/bin/zsh"
|
||||||
|
mutable = true
|
||||||
|
}
|
||||||
|
|
||||||
data "coder_parameter" "instance_location" {
|
data "coder_parameter" "instance_location" {
|
||||||
name = "instance_location"
|
name = "instance_location"
|
||||||
display_name = "Instance location"
|
display_name = "Instance location"
|
||||||
|
@ -268,7 +275,7 @@ resource "coder_agent" "dev" {
|
||||||
startup_script = data.coder_parameter.dotfiles_uri.value != "" ? "coder dotfiles -y ${data.coder_parameter.dotfiles_uri.value}" : null
|
startup_script = data.coder_parameter.dotfiles_uri.value != "" ? "coder dotfiles -y ${data.coder_parameter.dotfiles_uri.value}" : null
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
DOCKER_HOST= data.coder_parameter.install_podman.value == "true" ? "unix:///run/user/1000/podman/podman.sock" : "unix:///var/run/docker.sock"
|
DOCKER_HOST = data.coder_parameter.install_podman.value == "true" ? "unix:///run/user/1000/podman/podman.sock" : "unix:///var/run/docker.sock"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,6 +318,7 @@ resource "hcloud_server" "root" {
|
||||||
install_dotnet_setup = data.coder_parameter.install_dotnet.value
|
install_dotnet_setup = data.coder_parameter.install_dotnet.value
|
||||||
install_podman_setup = data.coder_parameter.install_podman.value
|
install_podman_setup = data.coder_parameter.install_podman.value
|
||||||
install_terraform_setup = data.coder_parameter.install_terraform.value
|
install_terraform_setup = data.coder_parameter.install_terraform.value
|
||||||
|
user_shell = data.coder_parameter.user_shell.value
|
||||||
})
|
})
|
||||||
|
|
||||||
dynamic "network" {
|
dynamic "network" {
|
||||||
|
|
Loading…
Reference in a new issue