Skip to content

RFC(Coder-Server): Template Settings #27

Closed
@djarbz

Description

@djarbz
Contributor

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.

Activity

matifali

matifali commented on Apr 24, 2025

@matifali
Member

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

transferred this issue fromcoder/moduleson May 8, 2025
added theissue type on May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @matifali@djarbz

      Issue actions

        RFC(Coder-Server): Template Settings · Issue #27 · coder/registry