feat: make shell customizable
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter 2023-06-15 22:06:52 +02:00
parent afd4540dc7
commit c59097d374
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
2 changed files with 11 additions and 3 deletions

View file

@ -3,7 +3,7 @@ users:
- name: ${username}
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
groups: sudo
shell: /bin/bash
shell: ${user_shell}
packages:
- zsh
- git

View file

@ -53,7 +53,14 @@ data "coder_parameter" "dotfiles_uri" {
see https://dotfiles.github.io
EOF
default = ""
default = ""
mutable = true
}
data "coder_parameter" "user_shell" {
name = "user_shell"
display_name = "Default Shell"
default = "/usr/bin/zsh"
mutable = true
}
@ -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
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_podman_setup = data.coder_parameter.install_podman.value
install_terraform_setup = data.coder_parameter.install_terraform.value
user_shell = data.coder_parameter.user_shell.value
})
dynamic "network" {