a10d676bbf1eb2b6b2ca00a4cf414471234d6eca

Author
Christian Rocha <christian@rocha.is>
Committer
Toby Padilla <toby@charm.sh>
Date

Message

Adjust comments in default config and add some newlines

Diff

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