1package config
2
3const 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```"
4
5const defaultConfig = `# The name of the server to show in the TUI.
6name: Soft Serve
7
8# The host and port to listen on. Defaults to 0.0.0.0:23231.
9host: %s
10port: %d
11
12# Access level for anonymous users. Options are: read-write, read-only and
13# no-access.
14anon-access: %s
15
16# You can grant read-only access to users without private keys. Any password
17# will be accepted.
18allow-keyless: false
19
20# Customize repo display in the menu. Only repos in this list will appear in
21# the TUI.
22repos:
23 - name: Home
24 repo: config
25 private: true
26 note: "Configuration and content repo for this server"
27`
28
29const hasKeyUserConfig = `
30
31# Authorized users. Admins have full access to all repos. Users can read all
32# repos and push to their collab-repos.
33users:
34 - name: Admin
35 admin: true
36 public-keys:
37%s
38`
39
40const defaultUserConfig = `
41# users:
42# - name: Admin
43# admin: true
44# public-keys:
45# - KEY TEXT`
46
47const exampleUserConfig = `
48# - name: Example User
49# collab-repos:
50# - REPO
51# public-keys:
52# - KEY TEXT
53`