-
Notifications
You must be signed in to change notification settings - Fork 0
/
conduit.nix
40 lines (39 loc) · 1.11 KB
/
conduit.nix
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
{
pkgs,
config,
...
}:
{
virtualisation.oci-containers.containers.conduit = {
image = "ghcr.io/girlbossceo/conduwuit:main";
autoStart = true;
ports = [ "127.0.0.1:8448:8448" ];
pull = "newer";
environment = {
CONDUWUIT_SERVER_NAME = "cything.io";
CONDUWUIT_DATABASE_PATH = "/var/lib/conduwuit";
CONDUWUIT_PORT = "8448";
CONDUWUIT_MAX_REQUEST_SIZE = "20000000"; # in bytes ~20MB
CONDUWUIT_ALLOW_REGISTRATION = "false";
CONDUWUIT_ALLOW_FEDERATION = "true";
CONDUWUIT_ALLOW_CHECK_FOR_UPDATES = "true";
CONDUWUIT_TRUSTED_SERVERS = ''["matrix.org"]'';
CONDUWUIT_ADDRESS = "0.0.0.0";
# CONDUIT_CONFIG = "";
};
volumes = [
"/opt/conduit/db:/var/lib/conduwuit/"
];
networks = [ "conduit-net" ];
};
systemd.services.create-conduit-net = {
serviceConfig.Type = "oneshot";
wantedBy = with config.virtualisation.oci-containers; [
"${backend}-conduit.service"
];
script = ''
${pkgs.podman}/bin/podman network exists conduit-net || \
${pkgs.podman}/bin/podman network create conduit-net
'';
};
}