Skip to content
/ base-workspace Public template

A reproducible dev workspace, built with docker, nix, pkgx, homebrew, vscode & terraform πŸ§‘β€πŸ’»βœ¨

License

Notifications You must be signed in to change notification settings

tsirysndr/base-workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Base Workspace πŸ§‘β€πŸ’»

ci

This is my base workspace for all my projects. It contains a portable docker environment with vscode tunnels already configured, provisioned using terraform.

Made with VHS

πŸš€ Quickstart

Create a new workspace using the pocketenv command line tool:

pocketenv init -t tsirysndr/base-workspace
pocketenv up

Or using terraform:

git clone https://github.com/tsirysndr/base-workspace.git
cd base-workspace
terraform init
terraform apply

A new Docker container will be created with the name base-workspace with pkgx, oh-my-posh, atuin and vscode server installed.

To connect to the environment, run:

docker logs base-workspace

and follow the vscode tunnel instructions.

You can also enter to the environment using:

docker exec -it base-workspace bash

✨ Bonus

oh-my-posh and atuin are already configured in the environment.

🐚 Environments

Name Description
devbox devbox environment with vscode tunnels configured.
devenv devenv environment with vscode tunnels configured.
flox flox environment with vscode tunnels configured.
hombrew homebrew environment with vscode tunnels configured.
nix nix environment with vscode tunnels configured.
pkgx pkgx environment with vscode tunnels configured.
default base environment with vscode tunnels configured.

βš™οΈ Inputs

Name Description Type Default
context Docker build context to use string null
hostname Hostname to use string null
image Docker image to use, required if context is not set string ghcr.io/pocketenv-io/pkgx:main
packages Packages to install list(string) []
user User to create string coder
volumes Volumes to mount map(string) { base-workspace = "/home/coder" }
workspace_name Name of the workspace string base-workspace

πŸ“¦ Outputs

Name Description Type
container_id Docker container id string

πŸ“š Examples

devbox.tfvars

workspace_name = "devbox-workspace"

user = "coder"

context = "./devbox"

volumes = {
  devbox-workspace = "/home/coder"
  devbox-nix = "/nix"
}

devenv.tfvars

workspace_name = "devenv-workspace"

user = "coder"

context = "./devenv"

volumes = {
  devenv-workspace = "/home/coder"
  devenv-nix = "/nix"
}

flox.tfvars

workspace_name = "flox-workspace"

user = "coder"

context = "./flox"

volumes = {
  flox-workspace = "/home/coder"
  flox-nix = "/nix"
}

homebrew.tfvars

workspace_name = "brew-workspace"

packages = [
  "jq",
  "gh"
]

user = "coder"

context = "./homebrew"

volumes = {
  brew-workspace = "/home/coder"
  linuxbrew = "/home/linuxbrew/.linuxbrew"
}

pkgx.tfvars

workspace_name = "pkgx-workspace"

packages = [
  "jq",
  "gh"
]

user = "coder"

context = "./pkgx"

volumes = {
  pkgx-workspace = "/home/coder"
}

πŸ“ License

This project is licensed under the MIT License.

About

A reproducible dev workspace, built with docker, nix, pkgx, homebrew, vscode & terraform πŸ§‘β€πŸ’»βœ¨

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published