2022-08-08 21:31:22 +03:00
|
|
|
{ inputs, lib, pkgs, tools, ... }:
|
2021-10-17 01:11:18 +03:00
|
|
|
let
|
|
|
|
inherit (tools.nginx) domain vhosts;
|
2022-08-08 21:31:22 +03:00
|
|
|
inherit (inputs.self.packages.${pkgs.system}) 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;
|
|
|
|
});
|
|
|
|
};
|
2021-10-17 01:11:18 +03:00
|
|
|
}
|