chore(dotfiles): document the newly created `user` and `dotfiles_uri` parameters

pull/133/head
Phorcys 1 year ago
parent ae23a5f7e3
commit 1d62eb70d8

@ -9,7 +9,44 @@ tags: [helper]
# Dotfiles
Allow developers to optionally bring their own [dotfiles repository](https://dotfiles.github.io)! Under the hood, this module uses the [coder dotfiles](https://coder.com/docs/v2/latest/dotfiles) command.
Allow developers to optionally bring their own [dotfiles repository](https://dotfiles.github.io).
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](https://coder.com/docs/v2/latest/dotfiles) command.
```tf
module "dotfiles" {
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```
## Examples
### Apply dotfiles as the current user
```tf
module "dotfiles" {
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```
### Apply dotfiles as root (only works if sudo is passwordless)
```tf
module "dotfiles" {
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
user = "root"
}
```
### Apply dotfiles as the current user and root (only works if sudo is passwordless)
```tf
module "dotfiles" {
@ -17,4 +54,12 @@ module "dotfiles" {
version = "1.0.0"
agent_id = coder_agent.example.id
}
module "dotfiles-root" {
source = "registry.coder.com/modules/dotfiles/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
user = "root"
dotfiles_uri = module.dotfiles.dotfiles_uri
}
```

Loading…
Cancel
Save