Skip to content

Instantly share code, notes, and snippets.

@zeratax
Last active December 12, 2020 23:44
Show Gist options
  • Save zeratax/6a218724ffa423986617ec15545d99e2 to your computer and use it in GitHub Desktop.
Save zeratax/6a218724ffa423986617ec15545d99e2 to your computer and use it in GitHub Desktop.
matrix-registration nix module example configuration
{ config, lib, pkgs, ... }:
let
# nur-pkgs = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {};
nur-pkgs = import <nur-pkgs> {};
in {
nixpkgs.config.packageOverrides = pkgs: rec {
nur = import <nur-pkgs> {
inherit pkgs;
};
matrix-registration = nur.matrix-registration;
};
imports = [ nur-pkgs.modules.matrix-registration ];
services.matrix-registration = {
enable = true;
settings = {
admin_secret = "verysecuresecret";
server_location = "http://localhost:8008";
};
};
services.matrix-synapse = {
enable = true;
database_type = "sqlite3";
registration_shared_secret = "testsecret";
listeners = [
{
port = 8008;
bind_address = "::1";
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
compress = false;
}
];
}
];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment