diff --git a/internal/config/defaults.go b/internal/config/defaults.go index 70c289622..f8af40772 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -2,35 +2,44 @@ package config const defaultReadme = "# Soft Serve\n\n Welcome! You can configure your Soft Serve server by cloning this repo and pushing changes.\n\n```\ngit clone ssh://{{.Host}}:{{.Port}}/config\n```" -const defaultConfig = `name: Soft Serve +const defaultConfig = `# The name of the server to show in the TUI. +name: Soft Serve + +# The host and port to listen on. Defaults to 0.0.0.0:23231. host: %s port: %d -# Set the access level for anonymous users. Options are: read-write, read-only and no-access. +# Access level for anonymous users. Options are: read-write, read-only and +# no-access. anon-access: %s -# Grant read-only access to users without private keys. Any password will be accepted. +# You can grant read-only access to users without private keys. Any password +# will be accepted. allow-keyless: false -# Customize repo display in the menu. +# Customize repo display in the menu. Only repos in this list will appear in +# the TUI. repos: - name: Home repo: config private: true - note: "Configuration and content repo for this server"` + note: "Configuration and content repo for this server" +` const hasKeyUserConfig = ` -# Users can read all repos and push to collab-repos. Admins have full access to all repos. +# Authorized users. Admins have full access to all repos. Users can read all +# repos and push to their collab-repos. users: - - name: admin + - name: Admin admin: true public-keys: -%s` +%s +` const defaultUserConfig = ` # users: -# - name: admin +# - name: Admin # admin: true # public-keys: # - KEY TEXT` @@ -40,4 +49,5 @@ const exampleUserConfig = ` # collab-repos: # - REPO # public-keys: -# - KEY TEXT` +# - KEY TEXT +`