dotfiles/nixng/containers/matrix/synapse/generic_worker.nix
magic_rb aff0158ef7
Reformat the whole flake using alejandra
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-03-02 22:17:03 +01:00

62 lines
1.3 KiB
Nix

{
makeSystem,
nixpkgs,
listener_resources,
name,
logConfig,
commonConfig,
}:
makeSystem {
system = "x86_64-linux";
name = "synapse-worker-${name}";
inherit nixpkgs;
config = {pkgs, ...}: {
dumb-init = {
enable = true;
type.services = {};
};
environment.systemPackages = [pkgs.openssh];
services.synapse.workers.${name} = {
package = import ./synapse-package.nix pkgs;
settings = {
worker_app = "synapse.app.generic_worker";
worker_listeners = [
{
port = 6167;
tls = false;
type = "http";
x_forwarded = true;
bind_adrresses = ["0.0.0.0"];
resources = [
{
names = listener_resources;
compress = false;
}
];
}
# {
# port = 9000;
# bind_addresses = [ "127.0.0.1" ];
# type = "manhole";
# }
];
worker_log_config = logConfig pkgs;
};
arguments = {
config-path = [
(commonConfig pkgs)
"/secrets/extra.yaml"
"/var/lib/registrations/extra.yaml"
];
keys-directory = [
"/var/lib/synapse/keys"
];
};
};
};
}