Allow developers to optionally bring their own dotfiles repository.
This will prompt the user for their dotfiles repository URL on template creation using a coder_parameter
.
Under the hood, this module uses the coder dotfiles command.
1module "dotfiles" { 2 source = "registry.coder.com/modules/dotfiles/coder" 3 version = "1.0.18" 4 agent_id = coder_agent.example.id 5}
1module "dotfiles" { 2 source = "registry.coder.com/modules/dotfiles/coder" 3 version = "1.0.18" 4 agent_id = coder_agent.example.id 5}
1module "dotfiles" { 2 source = "registry.coder.com/modules/dotfiles/coder" 3 version = "1.0.18" 4 agent_id = coder_agent.example.id 5 user = "root" 6}
1module "dotfiles" { 2 source = "registry.coder.com/modules/dotfiles/coder" 3 version = "1.0.18" 4 agent_id = coder_agent.example.id 5} 6 7module "dotfiles-root" { 8 source = "registry.coder.com/modules/dotfiles/coder" 9 version = "1.0.18" 10 agent_id = coder_agent.example.id 11 user = "root" 12 dotfiles_uri = module.dotfiles.dotfiles_uri 13}
You can set a default dotfiles repository for all users by setting the default_dotfiles_uri
variable:
1module "dotfiles" { 2 source = "registry.coder.com/modules/dotfiles/coder" 3 version = "1.0.18" 4 agent_id = coder_agent.example.id 5 default_dotfiles_uri = "https://github.com/coder/dotfiles" 6}