fix: seed starship config via /etc/skel for home volume workspaces#16
Merged
Conversation
The workspace Coder template mounts a persistent volume over /home/coder, which shadows any files written to the home directory during the image build. The init script seeds the home directory with cp -rT /etc/skel ~, so starship config must live in /etc/skel to survive the volume mount. - Move starship.toml COPY target from /home/coder/.config/ to /etc/skel/.config/ - Move starship init line from /home/coder/.bashrc to /etc/skel/.bashrc - Remove USER coder switch (no longer writing to home at build time)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Coder workspace template mounts a persistent volume over
/home/coder, which shadows any files written to the home directory during the image build. This means:~/.config/starship.tomlcopied during the base image build is invisible at runtime~/.bashrcwith the starship init line is overwritten bycp -rT /etc/skel ~in the init scriptThe result is starship is installed but never initialised — no prompt.
Fix
Move both the starship config and the init line into
/etc/skel, which is the source the workspace init script uses to seed the home volume:starship.toml→/etc/skel/.config/starship.tomleval "$(starship init bash)"→ appended to/etc/skel/.bashrcThe existing
cp -rT /etc/skel ~in the init script then correctly propagates both on every workspace start.