Skip to content

fix: seed starship config via /etc/skel for home volume workspaces#16

Merged
megheaiulian merged 1 commit into
mainfrom
fix/starship-skel
Feb 26, 2026
Merged

fix: seed starship config via /etc/skel for home volume workspaces#16
megheaiulian merged 1 commit into
mainfrom
fix/starship-skel

Conversation

@megheaiulian

Copy link
Copy Markdown
Contributor

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.toml copied during the base image build is invisible at runtime
  • ~/.bashrc with the starship init line is overwritten by cp -rT /etc/skel ~ in the init script

The 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.toml
  • eval "$(starship init bash)" → appended to /etc/skel/.bashrc

The existing cp -rT /etc/skel ~ in the init script then correctly propagates both on every workspace start.

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)
@megheaiulian megheaiulian merged commit 69f59b1 into main Feb 26, 2026
3 checks passed
@megheaiulian megheaiulian deleted the fix/starship-skel branch February 26, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant