Skip to content

Commit

Permalink
Adjust comments in default config and add some newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm authored and Toby Padilla committed Oct 13, 2021
1 parent de72557 commit a10d676
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions internal/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -40,4 +49,5 @@ const exampleUserConfig = `
# collab-repos:
# - REPO
# public-keys:
# - KEY TEXT`
# - KEY TEXT
`

0 comments on commit a10d676

Please sign in to comment.