blob: c27dd2b0e1699563a3295977ffd90788bbbc8231 (
plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
|
# Szurubooru {#module-services-szurubooru}
An image board engine dedicated for small and medium communities.
## Configuration {#module-services-szurubooru-basic-usage}
By default the module will execute Szurubooru server only, the web client only contains static files that can be reached via a reverse proxy.
Here is a basic configuration:
```nix
{
services.szurubooru = {
enable = true;
server = {
port = 8080;
settings = {
domain = "https://szurubooru.domain.tld";
secretFile = /path/to/secret/file;
};
};
database = {
passwordFile = /path/to/secret/file;
};
};
}
```
## Reverse proxy configuration {#module-services-szurubooru-reverse-proxy-configuration}
The preferred method to run this service is behind a reverse proxy not to expose an open port. For example, here is a minimal Nginx configuration:
```nix
{
services.szurubooru = {
enable = true;
server = {
port = 8080;
# ...
};
# ...
};
services.nginx.virtualHosts."szurubooru.domain.tld" = {
locations = {
"/api/".proxyPass = "http://localhost:8080/";
"/data/".root = config.services.szurubooru.dataDir;
"/" = {
root = config.services.szurubooru.client.package;
tryFiles = "$uri /index.htm";
};
};
};
}
```
## Extra configuration {#module-services-szurubooru-extra-config}
Not all configuration options of the server are available directly in this module, but you can add them in `services.szurubooru.server.settings`:
```nix
{
services.szurubooru = {
enable = true;
server.settings = {
domain = "https://szurubooru.domain.tld";
delete_source_files = "yes";
contact_email = "example@domain.tld";
};
};
}
```
You can find all of the options in the default config file available [here](https://github.com/rr-/szurubooru/blob/master/server/config.yaml.dist).
|