nixos-config/hosts/chunk/conduit.nix

41 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2024-12-17 02:39:04 -05:00
{
pkgs,
config,
...
2024-12-19 02:32:58 -05:00
}:
{
2024-12-17 02:39:04 -05:00
virtualisation.oci-containers.containers.conduit = {
2024-12-22 02:43:02 -05:00
image = "ghcr.io/girlbossceo/conduwuit:main";
2024-12-17 02:39:04 -05:00
autoStart = true;
2024-12-19 02:32:58 -05:00
ports = [ "127.0.0.1:8448:8448" ];
2024-12-17 02:39:04 -05:00
pull = "newer";
environment = {
2024-12-22 02:43:02 -05:00
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 = "";
2024-12-17 02:39:04 -05:00
};
volumes = [
2024-12-22 02:43:02 -05:00
"/opt/conduit/db:/var/lib/conduwuit/"
2024-12-17 02:39:04 -05:00
];
2024-12-19 02:32:58 -05:00
networks = [ "conduit-net" ];
2024-12-17 02:39:04 -05:00
};
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
'';
};
}