mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Start working on Matrix config
This commit is contained in:
parent
69a8cbb049
commit
493e1052aa
1 changed files with 30 additions and 0 deletions
30
hosts/cube/matrix.nix
Normal file
30
hosts/cube/matrix.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, ulib, ... }: with ulib;
|
||||
|
||||
# Documenting this because I found the way Matrix works a bit weird:
|
||||
#
|
||||
# Since it uses normal plain HTTP on ports 80 and 443, we are using
|
||||
# the root domain and proxying ${domain}/_matrix to the local matrix
|
||||
# instance that is running. This means there are no matrix or chat
|
||||
# or whatever 3rd level domains in this setup. The server url is
|
||||
# the root, everywhere.
|
||||
|
||||
let
|
||||
inherit (config.networking) domain;
|
||||
in serverSystemConfiguration {
|
||||
age.secrets."cube/password.matrix".owner = "matrix";
|
||||
age.secrets."cube/password.matrix.sync".owner = "matrix";
|
||||
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "matrix" ];
|
||||
ensureUsers = [{
|
||||
name = "matrix";
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
|
||||
services.matrix-synapse = { # enabled {
|
||||
settings = {
|
||||
server_name = domain;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue