2022-12-12 14:18:40 +01:00
|
|
|
{ config, lib, ... }:
|
2022-12-07 10:14:39 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.mx-puppet-discord;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
users.groups.keys-matrix-registrations = { };
|
|
|
|
|
|
|
|
sops.secrets."matrix/registrations/mx-puppet-discord" = {
|
|
|
|
owner = config.users.users.matrix-synapse.name;
|
|
|
|
group = config.users.groups.keys-matrix-registrations.name;
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.mx-puppet-discord = {
|
|
|
|
serviceConfig.SupplementaryGroups = [ config.users.groups.keys-matrix-registrations.name ];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
services.mx-puppet-discord.enable = true;
|
|
|
|
services.mx-puppet-discord.settings = {
|
|
|
|
bridge = {
|
|
|
|
bindAddress = "localhost";
|
|
|
|
domain = "pvv.ntnu.no";
|
2022-12-12 16:05:50 +01:00
|
|
|
homeserverUrl = "https://matrix.pvv.ntnu.no";
|
2022-12-07 10:14:39 +01:00
|
|
|
};
|
|
|
|
provisioning.whitelist = [ "@dandellion:dodsorf\\.as" "@danio:pvv\\.ntnu\\.no"];
|
|
|
|
relay.whitelist = [ ".*" ];
|
|
|
|
selfService.whitelist = [ "@danio:pvv\\.ntnu\\.no" "@dandellion:dodsorf\\.as" ];
|
|
|
|
};
|
|
|
|
services.mx-puppet-discord.serviceDependencies = [ "matrix-synapse.target" "nginx.service" ];
|
|
|
|
|
|
|
|
|
|
|
|
services.matrix-synapse-next.settings.app_service_config_files = [ config.sops.secrets."matrix/registrations/mx-puppet-discord".path ];
|
|
|
|
|
|
|
|
}
|