services: matrix: use shared registration secret
This commit is contained in:
parent
6b1de02ea3
commit
6bfa421112
3 changed files with 13 additions and 3 deletions
|
|
@ -16,8 +16,13 @@ let
|
|||
domain = config.networking.domain;
|
||||
in
|
||||
{
|
||||
options.my.services.matrix = {
|
||||
enable = lib.mkEnableOption "Matrix Synapse";
|
||||
options.my.services.matrix = with lib; {
|
||||
enable = mkEnableOption "Matrix Synapse";
|
||||
secret = mkOption {
|
||||
type = types.str;
|
||||
example = "deadbeef";
|
||||
description = "Shared secret to register users";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
@ -45,6 +50,8 @@ in
|
|||
server_name = domain;
|
||||
public_baseurl = "https://matrix.${domain}";
|
||||
|
||||
registration_shared_secret = cfg.secret;
|
||||
|
||||
listeners = [
|
||||
# Federation
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue