2023-11-22 12:23:00 +01:00
|
|
|
{ certs }:
|
|
|
|
{ lib, ... }:
|
|
|
|
let
|
|
|
|
mobilizonDomain = certs.domain;
|
|
|
|
port = 41395;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "mobilizon";
|
2024-08-19 12:14:29 +02:00
|
|
|
meta.maintainers = with lib.maintainers; [
|
|
|
|
minijackson
|
|
|
|
erictapen
|
|
|
|
];
|
2023-11-22 12:23:00 +01:00
|
|
|
|
|
|
|
nodes.server =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.mobilizon = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
":mobilizon" = {
|
|
|
|
":instance" = {
|
|
|
|
name = "Test Mobilizon";
|
|
|
|
hostname = mobilizonDomain;
|
|
|
|
};
|
|
|
|
"Mobilizon.Web.Endpoint".http.port = port;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.postgresql.package = pkgs.postgresql_14;
|
|
|
|
|
|
|
|
security.pki.certificateFiles = [ certs.ca.cert ];
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."${mobilizonDomain}" = {
|
|
|
|
enableACME = lib.mkForce false;
|
|
|
|
sslCertificate = certs.${mobilizonDomain}.cert;
|
|
|
|
sslCertificateKey = certs.${mobilizonDomain}.key;
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.hosts."::1" = [ mobilizonDomain ];
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
server.wait_for_unit("mobilizon.service")
|
|
|
|
server.wait_for_open_port(${toString port})
|
|
|
|
server.succeed("curl --fail https://${mobilizonDomain}/")
|
|
|
|
'';
|
|
|
|
}
|