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 display in the TUI. You may want to change this if your
9# server is accessible from a different host and/or port that what it's
10# actually listening on (for example, if it's behind a reverse proxy).
11host: %s
12port: %d
13
14# Access level for anonymous users. Options are: admin-access, read-write,
15# read-only, and no-access.
16anon-access: %s
17
18# You can grant read-only access to users without private keys. Any password
19# will be accepted.
20allow-keyless: %t
21
22# Customize repo display in the menu.
23repos:
24 - name: Home
25 repo: config
26 private: true
27 note: "Configuration and content repo for this server"
28 readme: README.md
29`
30
31const hasKeyUserConfig = `
32
33# Authorized users. Admins have full access to all repos. Private repos are only
34# accessible by admins and collab users. Regular users can read public repos
35# based on your anon-access setting.
36users:
37 - name: Admin
38 admin: true
39 public-keys:
40%s
41`
42
43const defaultUserConfig = `
44# users:
45# - name: Admin
46# admin: true
47# public-keys:
48# - ssh-ed25519 AAAA... # redacted
49# - ssh-rsa AAAAB3Nz... # redacted`
50
51const exampleUserConfig = `
52# - name: Example User
53# collab-repos:
54# - REPO
55# public-keys:
56# - ssh-ed25519 AAAA... # redacted
57# - ssh-rsa AAAAB3Nz... # redacted
58`