Skip to content

RFC(Coder-Server): Template Settings #443

Open
@djarbz

Description

@djarbz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions