46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ pkgs, lib, ... }:
|
|
let
|
|
inherit (lib) mkForce;
|
|
in
|
|
{
|
|
config = {
|
|
custom.cifs-mounts = [ "conduit" ];
|
|
|
|
services.matrix-conduit = {
|
|
enable = true;
|
|
# package = inputs.conduit.packages.${pkgs.system}.default;
|
|
package = pkgs.matrix-conduit;
|
|
settings.global = {
|
|
server_name = "xinyang.life";
|
|
port = 6167;
|
|
# database_path = "/var/lib/matrix-conduit/";
|
|
max_concurrent_requests = 100;
|
|
log = "info";
|
|
database_backend = "rocksdb";
|
|
allow_registration = false;
|
|
|
|
well_known = {
|
|
client = "https://msg.xinyang.life";
|
|
server = "msg.xinyang.life:443";
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.services.conduit = {
|
|
serviceConfig = {
|
|
DynamicUser = mkForce false;
|
|
};
|
|
};
|
|
|
|
users.users.conduit = {
|
|
group = "conduit";
|
|
isSystemUser = true;
|
|
};
|
|
users.groups.conduit = { };
|
|
|
|
services.caddy.enable = true;
|
|
services.caddy.virtualHosts."https://msg.xinyang.life:443".extraConfig = ''
|
|
reverse_proxy /_matrix/* localhost:6167
|
|
'';
|
|
};
|
|
}
|