1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
package ugit
#Port: int & >0 & <65536 @nix(type=types.port)
#Path: string & !=""
#URL: string & =~"^[a-z][a-z0-9+.-]*://"
#ProfileLink: string & =~"^[^,]+,.+$" @go(type=profileLink, parse=parseProfileLink) @nix(type=gen.profileLink, apply=gen.profileLinkApply, import=gen)
// Path to directory containing repositories
"repo-dir": #Path | *".ugit" @nix(default="/var/lib/ugit/repos")
ssh: {
// Enable SSH server
enable: bool | *true
// Path to authorized_keys
"authorized-keys": #Path | *".ssh/authorized_keys" @nix(default="/var/lib/ugit/authorized_keys")
// SSH clone URL base
"clone-url": #URL | *"ssh://localhost:8448"
// SSH port
port: #Port | *8448
// SSH host key (created if it doesn't exist)
"host-key": #Path | *".ssh/ugit_ed25519" @nix(default="/var/lib/ugit/ugit_ed25519")
}
http: {
// Enable HTTP server
enable: bool | *true
// HTTP clone URL base
"clone-url": #URL | *"http://localhost:8449"
// HTTP port
port: #Port | *8449
}
meta: {
// App title
title: string | *"ugit"
// App description
description: string | *"Minimal git server"
}
profile: {
// Username for index page
username: string | *""
// Email for index page
email: string | *""
// Link(s) for index page
links: [...#ProfileLink]
}
log: {
// Logging level
level: "debug" | "info" | "warn" | "warning" | *"error" @go(type=slog.Level, parse=parseLogLevel, import="log/slog")
// Print logs in JSON(L) format
json: bool | *false
}
// Show private repos in web interface
"show-private": bool | *false
|