2023-08-31 01:55:45 +03:00
|
|
|
{ depot, lib, pkgs, ... }:
|
2021-10-17 01:11:18 +03:00
|
|
|
let
|
2023-08-31 01:55:45 +03:00
|
|
|
inherit (depot.lib.nginx) domain vhosts;
|
2023-02-24 16:16:15 +02:00
|
|
|
inherit (depot.packages) cinny;
|
2021-10-17 01:11:18 +03:00
|
|
|
in
|
|
|
|
{
|
2022-08-08 21:31:22 +03:00
|
|
|
services.nginx.virtualHosts."chat.${domain}" = lib.recursiveUpdate
|
|
|
|
(vhosts.static cinny.webroot)
|
|
|
|
{
|
|
|
|
locations."=/config.json".alias = pkgs.writeText "cinny-config.json" (builtins.toJSON {
|
|
|
|
defaultHomeserver = 0;
|
|
|
|
homeserverList = [ "${domain}" ];
|
|
|
|
allowCustomHomeservers = false;
|
|
|
|
});
|
|
|
|
};
|
2024-06-01 23:01:48 +03:00
|
|
|
|
|
|
|
security.acme.certs."chat.${domain}" = {
|
|
|
|
dnsProvider = "exec";
|
|
|
|
webroot = lib.mkForce null;
|
|
|
|
};
|
2021-10-17 01:11:18 +03:00
|
|
|
}
|