Skip to content

RFC(Coder-Server): Template Settings #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
djarbz opened this issue Apr 23, 2025 · 1 comment · May be fixed by #88
Open

RFC(Coder-Server): Template Settings #27

djarbz opened this issue Apr 23, 2025 · 1 comment · May be fixed by #88

Comments

@djarbz
Copy link

djarbz commented Apr 23, 2025

Referring to the settings option on the module.
https://github.com/coder/modules/blob/4b4cebaf4dfbf200ff9cb2a0dc6ff9bbf3101ce8/code-server/run.sh#L22C1-L27C3

My understanding is that there are 3 levels of preference settings and highest takes precedence.

  1. Workspace settings: <GIT REPO>/.vscode/settings.json
  2. User settings: $HOME/.local/share/code-server/User/settings.json
  3. Machine settings: $HOME/.local/share/code-server/Machine/settings.json

I would put 1 & 2 as user defined settings where a dev might need to configure a setting that should be shared by a team and personal settings for their own personal preference.
I would then think that a template owner would want to provide sensible defaults in 3 that can then be overridden by the user via option 1 & 2.
Currently this module writes to 2 upon workspace creation, but never again, even if the template is updated.

My proposal is that, for backwards compatibility, a new machine-settings option is added to the module, much like the current settings option, except that it will always be overwritten by the module upon startup.
This will allow template owners to create sensible defaults and allow updating and changing these defaults in future template revisions.
This should also allow users and repos to override these settings via the user and workspace settings.

@matifali
Copy link
Member

I like the proposal. There is no harm in doing it, and it adds a lot of flexibility.

@Parkreiner Parkreiner transferred this issue from coder/modules May 8, 2025
@djarbz djarbz linked a pull request May 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants