| 1 | ### |
| 2 | ##### Global Configuration (effects multiple programs) |
| 3 | ### |
| 4 | |
| 5 | # site name used in various places across the instance |
| 6 | site_name = "🌄 Ayllu" |
| 7 | |
| 8 | # Default branch to use when creating new repositories. |
| 9 | # default_branch = "master" |
| 10 | default_branch = "main" |
| 11 | |
| 12 | # Global logging level |
| 13 | log_level = "INFO" |
| 14 | |
| 15 | # When base_path is specified collection/repo pairs are evaluated relative to |
| 16 | # base path. So for example git clone ayllu@example.org:fuu/bar will |
| 17 | # automatically resolve to $basepath/fuu/bar. |
| 18 | base_path = "/var/lib/ayllu/repos" |
| 19 | |
| 20 | # A collection refers to a group of repositories. Each collection may contain only a |
| 21 | # single level of repositories e.g. [$collection/repo-a, $collection/repo-b]. |
| 22 | # |
| 23 | [[collections]] |
| 24 | # name of the code collection |
| 25 | name = "projects" |
| 26 | description = "Some really cool projects" |
| 27 | path = "/path/to/projects" |
| 28 | # If true the collection will not show up in the main index or RSS feeds |
| 29 | hidden = false |
| 30 | |
| 31 | # Users are associated with "Identities" in Ayllu where each identity refers |
| 32 | # to a particular code author and system account on a given server. |
| 33 | [[identities]] |
| 34 | username = "demo" |
| 35 | authorized_keys = [ |
| 36 | # public keys go here |
| 37 | ] |
| 38 | # E-mail address of the author |
| 39 | email = "example@example.org" |
| 40 | # Optional "tagline" associated with the author |
| 41 | tagline = "Programmer interested free software" |
| 42 | # Optional link to an avatar containing an image representing the author |
| 43 | avatar = { url = "https://example.org/avatar.png", mime_type = "image/png" } |
| 44 | # Array of personal websites, social media, etc. associated with the author |
| 45 | profiles = [ |
| 46 | { url = "https://example.com", mime_type = "text/html"}, |
| 47 | { url = "https://example.org/@example", mime_type = "text/html"}, |
| 48 | ] |
| 49 | |
| 50 | [database] |
| 51 | # Path to the SQLite database |
| 52 | path = "/var/lib/ayllu/state.db" |
| 53 | |
| 54 | ### |
| 55 | ##### Web Configuration (ayllu-web) |
| 56 | ### |
| 57 | |
| 58 | [web] |
| 59 | |
| 60 | # Interface and port to listen on |
| 61 | address = "127.0.0.1:10000" |
| 62 | |
| 63 | # A valid URI that identifies this server on the global internet |
| 64 | origin = "localhost:10000" |
| 65 | |
| 66 | # enable when ayllu is being served from a "subpath". Clicking the home |
| 67 | # button will send the user back to /browse instead of /. This is useful if you |
| 68 | # have a landing page at the root of your webserver path. |
| 69 | subpath_mode = false |
| 70 | |
| 71 | # friendly message to display on the about page of the main site which might |
| 72 | # include details such as contact information, etc. markdown is supported. |
| 73 | blurb = """ |
| 74 | # Welcome to Ayllu! |
| 75 | """ |
| 76 | |
| 77 | # The number of threads to spawn by Tokio, typically this will be the number |
| 78 | # of logical processors (cores) you have on your system |
| 79 | worker_threads = 8 |
| 80 | |
| 81 | # The number of additional threads that can be launched to support synchronous |
| 82 | # blocking operations. |
| 83 | max_blocking_threads = 512 |
| 84 | |
| 85 | # The number of suggested seconds to wait before polling the server again |
| 86 | # across RSS feeds. The default of 1 hour is a reasonable default in most |
| 87 | # cases. |
| 88 | rss_time_to_live = 3600 |
| 89 | |
| 90 | # Themes are CSS files but you can also directly include some |
| 91 | # simple CSS right in your config which will be applied everywhere. |
| 92 | extra-css = """ |
| 93 | body { |
| 94 | background-color: pink; |
| 95 | } |
| 96 | """ |
| 97 | # # Set the theme which is served by default when no setting |
| 98 | # # is configured in client cookies. |
| 99 | default_theme = "stella" |
| 100 | |
| 101 | # # Additional themes can be added such as below, see ayllu/themes for |
| 102 | # # examples of customization. |
| 103 | [[web.themes]] |
| 104 | # Name for your theme |
| 105 | name = "stella" |
| 106 | # All of the CSS content served as the theme. |
| 107 | css_content = """ |
| 108 | body { |
| 109 | background-color: pink; |
| 110 | } |
| 111 | """ |
| 112 | # Git HTTP server options |
| 113 | [web.git] |
| 114 | # Global option to enable the Git "Smart HTTP" server which will serve |
| 115 | # non-hidden repositories for cloning over HTTP. The default is true but if |
| 116 | # set to false it will globally disable all cloning which you might want to do |
| 117 | # if you want to run your own fcgi server e.g. |
| 118 | smart_http = true |
| 119 | # URL to suggest for cloning via SSH, if unspecified git cloning option will |
| 120 | # not appear in the repository page. |
| 121 | clone_url = "git@localhost" |
| 122 | |
| 123 | # this toggles the GIT_HTTP_EXPORT_ALL option for git-http-backend which will |
| 124 | # allow cloning of all repositories unless they are marked as private. If this |
| 125 | # option is not toggled then the file git-daemon-export-ok exist in the repository |
| 126 | # for cloing to be permitted. |
| 127 | export_all = false |
| 128 | |
| 129 | # static hosting |
| 130 | # see an example Nginx configuration in contrib/nginx/nginx.conf |
| 131 | [sites] |
| 132 | # set false if you want to disallow all static hosting |
| 133 | enabled = false |
| 134 | |
| 135 | # tree-sitter backed syntax highlighting |
| 136 | # NOTE that tree-sitter packaging is hit-or-miss (mostly miss) in that all |
| 137 | # distributions do things differently. Alpine has the most robust ts packaging. |
| 138 | # Debian stable / testing has none. Archlinux has a few packages without |
| 139 | # queries. |
| 140 | # |
| 141 | [web.tree-sitter] |
| 142 | |
| 143 | # Base directory to look for shared objects and other ts configuration in. |
| 144 | base_path = "/usr/lib/helix/runtime" |
| 145 | |
| 146 | # tree-sitter highlighting keywords, these are attributes that will be |
| 147 | # exposed as CSS classes which can be used to create themes. |
| 148 | keywords = [ |
| 149 | "attribute", |
| 150 | "comment", |
| 151 | "constant", |
| 152 | "function.builtin", |
| 153 | "function", |
| 154 | "keyword", |
| 155 | "operator", |
| 156 | "property", |
| 157 | "punctuation", |
| 158 | "punctuation.bracket", |
| 159 | "punctuation.delimiter", |
| 160 | "string", |
| 161 | "string.special", |
| 162 | "tag", |
| 163 | "type", |
| 164 | "type.builtin", |
| 165 | "variable", |
| 166 | "variable.builtin", |
| 167 | "variable.parameter", |
| 168 | "keyword_insert", |
| 169 | "addition", |
| 170 | "removal" |
| 171 | ] |
| 172 | |
| 173 | # This section allows you to override any highlights with custom configuration. |
| 174 | [web.tree-sitter.highlights] |
| 175 | |
| 176 | # this results in two new CSS classes ts_addition and ts_removal which can |
| 177 | # be configured in theme stylesheets. |
| 178 | diff = """ |
| 179 | ; used to highlight diffs in the UI |
| 180 | [(addition) (new_file)] @addition |
| 181 | [(deletion) (old_file)] @removal |
| 182 | |
| 183 | (commit) @constant |
| 184 | (location) @attribute |
| 185 | (command) @variable.builtin |
| 186 | """ |
| 187 | |
| 188 | # Templates are used to control how shared objects and ts configuration is |
| 189 | # loaded from the file system. In the strings below the value {language} will |
| 190 | # be replaced with the language name as defined in the [[languages]] section |
| 191 | # described below. NOTE that names are case sensitive and effect not only the |
| 192 | # file name but the function name loaded from any shared object. |
| 193 | |
| 194 | [web.tree-sitter.template] |
| 195 | # required |
| 196 | module = "grammars/{language}.so" |
| 197 | # required |
| 198 | highlights = "queries/{language}/highlights.scm" |
| 199 | # optional |
| 200 | locals = "queries/{language}/locals.scm" |
| 201 | # optional |
| 202 | injections = "queries/{language}/injections.scm" |
| 203 | |
| 204 | # The [[languages]] setion controls how file names, their extensions, and |
| 205 | # script content is associated with programming languages. Syntax highlighting |
| 206 | # will only be enabled for languages which are specified below. |
| 207 | |
| 208 | # Add a programming language and associate files and extensions with it. |
| 209 | [[web.languages]] |
| 210 | name = "FuuLang" |
| 211 | extension = ["bar", "baz"] |
| 212 | filenames = ["Filefile"] |
| 213 | # # deep pink |
| 214 | color = "#ff1493" |
| 215 | |
| 216 | # Sometimes languages are associated with extensions that you might not expect |
| 217 | # and so you can override those such as below. |
| 218 | [[web.languages]] |
| 219 | name = "rust" |
| 220 | extensions = ["rs"] |
| 221 | |
| 222 | # Large File Store configuration |
| 223 | [web.lfs] |
| 224 | # template URL to construct an API request which will be used to lookup the |
| 225 | # reference object of the file. Other LFS server implementations may work but |
| 226 | # this has only been tested with https://github.com/jasonwhite/rudolfs |
| 227 | url_template = "/lfs/{collection}/{name}/object/{oid}" |
| 228 | |
| 229 | ### |
| 230 | ##### Shell Configuration (ayllu-shell) |
| 231 | ### |
| 232 | |
| 233 | [shell] |
| 234 | motd = """ |
| 235 | A Hyper Performant & Hackable Code Forge Built on Open Standards. |
| 236 | """ |
| 237 | |
| 238 | ### |
| 239 | ##### Build Configuration |
| 240 | ### |
| 241 | |
| 242 | # Global build configuration |
| 243 | # Used to configure the runtime properties of ayllu-build |
| 244 | [build] |
| 245 | # Number of seconds to wait after interrupting build processes before sending |
| 246 | # SIGKILL. |
| 247 | interrupt_timeout = 10 |
| 248 | # Path to an OCI runtime implementation, e.g. youki, runc, crun |
| 249 | oci_binary = "/usr/bin/crun" |
| 250 | [build.pre_processor] |
| 251 | # Path to a configuration file in your repositories |
| 252 | source = ".ayllu-build.jsonnet" |
| 253 | # Program and arguments to pass to the pre-processor |
| 254 | program = "jsonnet" |
| 255 | args = ["-"] |
| 256 | |
| 257 | ### |
| 258 | ##### Quipu Configuration |
| 259 | ### |
| 260 | |
| 261 | [quipu] |
| 262 | |
| 263 | [[quipu.instances]] |
| 264 | name = "ayllu-forge" |
| 265 | url = "https://ayllu-forge.org" |
| 266 | |
| 267 | |
| 268 | ### |
| 269 | #### Dispatch Configuration |
| 270 | ### |
| 271 | |
| 272 | [dispatch] |
| 273 | [dispatch.notifier.ntfy] |
| 274 | endpoint = "http://127.0.0.1:8000" |
| 275 | |
| 276 | [[dispatch.on_event]] |
| 277 | selectors = ["BuildStarted", "BuildFinished"] |
| 278 | # NOTE that a wildcard here will result in MANY notifications |
| 279 | # selectors = ["*"] |
| 280 | actor = { notify = { topic = "ayllu-main" } } |
| 281 | |
| 282 | [[dispatch.on_event]] |
| 283 | selectors = ["*"] |
| 284 | actor = "logger" |