Skip to content

Commit 0348ac5

Browse files
Merge branch 'main' into kc/cooldown
2 parents b8ea0ec + 40847d6 commit 0348ac5

4 files changed

Lines changed: 369 additions & 35 deletions

File tree

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,7 @@ You can also run `devenv check` to verify that the generated devcontainer.json f
131131
132132
## Configuration
133133
134-
**Project config**: `.devcontainer/devenv.yaml` - Project-specific settings (name, ports, IDE plugins, commands, etc). Checked into version control.
135-
136-
**User config**: `~/.config/devenv/devenv.yaml` - Personal preferences (dotfiles, additional IDE plugins). Merged with project config for the user-specific devcontainer.
137-
138-
Two devcontainer files are generated:
139-
- `.devcontainer/user/devcontainer.json` - Merged config with your personal settings
140-
- `.devcontainer/shared/devcontainer.json` - Project-only config for team use
141-
142-
Your user-specific file is excluded from the Git repository with a .gitignore entry. The general project file can be checked in to provide a project environment for cloud-based editors.
143-
144-
For detailed configuration specifications, see the [Configuration Reference](docs/configuration.md).
134+
For detailed configuration specifications, including all supported fields, modules and the escape hatch, see the [Configuration Reference](docs/configuration.md).
145135
146136
## Development
147137
@@ -169,6 +159,13 @@ The project also includes generation tests that validate the real program output
169159
./generation-tests/run-tests.sh
170160
```
171161

162+
### Contributing
163+
164+
#### Adding a module
165+
166+
See [docs/contributing/adding-a-module.md](docs/contributing/adding-a-module.md)
167+
for a guide on implementing, testing and documenting a new built-in module.
168+
172169
### Release
173170

174171
The project uses a GitHub action to build and publish date-based releases that contain native binaries for macOS arm64 (m-series processors), Linux amd64 and Linux arm64.

core/src/test/resources/userConfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ dotfiles:
88
repository: "https://github.com/example/dotfiles.git"
99
targetPath: "~"
1010
installCommand: "install.sh"
11-
containerSize: small
11+
containerSize: small

docs/configuration.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,17 @@ The user config (`~/.config/devenv/devenv.yaml`) supports the following (optiona
7878

7979
### Dotfiles Configuration
8080

81-
The `dotfiles` field in the user config allows you to specify a GitHub repository containing your personal dotfiles to
82-
be cloned and installed into the devcontainer. All three fields are required.
83-
84-
| Field | Description |
85-
|------------------|-------------------------------------------------------------|
86-
| `repository` | GitHub repository (format: `username/repo`) |
87-
| `targetPath` | Path where dotfiles will be cloned in the container |
88-
| `installCommand` | Script to run for installation (executed from `targetPath`) |
81+
The `dotfiles` field allows you to specify a GitHub repository containing your personal dotfiles to be cloned and
82+
installed into the devcontainer. All three fields are required.
83+
The dotfiles setup runs after project/container setup
84+
to avoid interfering with shared configuration. The repository is cloned into the container at the specified path and
85+
the `installCommand` is executed from there.
86+
87+
| Field | Description |
88+
|------------------|-------------------------------------------------------------------------|
89+
| `repository` | Full GitHub repository URL (eg. `https://github.com/username/dotfiles`) |
90+
| `targetPath` | Path where dotfiles will be cloned in the container |
91+
| `installCommand` | Script to run for installation (executed from `targetPath`) |
8992

9093
### Example
9194

@@ -95,9 +98,9 @@ plugins:
9598
- usernamehw.errorlens
9699
- eamodio.gitlens
97100
dotfiles:
98-
repository: "your-github-id/your-dotfiles-repo"
101+
repository: "https://github.com/username/dotfiles"
99102
targetPath: "~/dotfiles"
100-
installCommand: "install.sh"
103+
installCommand: "./install.sh"
101104
```
102105

103106
## Escape Hatch Spec
@@ -172,20 +175,10 @@ modules:
172175
- docker-in-docker # Now enabled
173176
```
174177

175-
## Dotfiles
176-
177-
You can configure personal dotfiles in your user config (`~/.config/devenv/devenv.yaml`) to automatically clone and
178-
install them during container creation:
179-
180-
```yaml
181-
dotfiles:
182-
repository: "your-github-id/your-dotfiles-repo"
183-
targetPath: "~/dotfiles"
184-
installCommand: "install.sh"
185-
```
178+
### Adding a new module
186179

187-
The dotfiles setup runs after project/container setup to avoid interfering with shared configuration. The repository is
188-
cloned into the container at the specified path, and the `installCommand` is executed from there.
180+
See the [Adding a Module](contributing/adding-a-module.md) guide for a full walkthrough of how to
181+
implement, test and document a new built-in module.
189182

190183
## Container Size
191184

0 commit comments

Comments
 (0)