-
-
Save bpmct/0b2a2d43a8b63d192580a65022b35f5b to your computer and use it in GitHub Desktop.
Example with Coder dotfiles command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ex. user manually applies dotfiles once logged in to workspace | |
$ coder dotfiles apply https://github.com/bpmct/dot | |
# Found install.sh. Run (yes/no): yes | |
# Copying files... | |
$ coder dotfiles apply https://github.com/holman/dotfiles | |
# Found script/bootstrap. Run (yes/no): yes | |
# Installing package x, y, and z... | |
# Running script a, b, c... | |
$ coder dotfiles apply https://github.com/craftzdog/dotfiles-public | |
# Cloning to $HOME/dotfiles | |
# Create symlink (yes/no): yes | |
# ✅ Symlinked $HOME/dotfiles to $HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ex. dotfiles built in to template | |
variable "dotfiles_uri" { | |
description = <<EOT | |
Optional: specify a URL for your dotfiles repo | |
- see: https://dotfiles.github.io | |
EOT | |
sensitive = false # user-level variable | |
} | |
resource "coder_agent" "dev" { | |
arch = "amd64" | |
auth = "aws-instance-identity" | |
os = "linux" | |
init_script<<EOT | |
# add dotfiles | |
if [ -n "${var.dotfiles_uri}" ]; then | |
coder dotfiles apply ${var.dotfiles_uri} --yes | |
fi | |
EOT | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment