feat: massive refactoring...

This commit is contained in:
Xavier Morel
2025-11-09 00:45:00 +01:00
parent f9446df46d
commit 3245b6b89f
77 changed files with 3233 additions and 582 deletions

70
containers/matrix.nix Normal file
View File

@@ -0,0 +1,70 @@
{
...
}:
let
db_pass = import ../config/_passwords.nix;
in
{
my-lxc.matrix = {
container = {
cores = 2;
memory = 2048;
disk = "4G";
swap = 512;
};
system = {
additionalPorts = [
80
8008
8080
5173
];
importConfig = [
../config/matrix-synapse.nix
../config/matrix-mas.nix
../config/matrix-nginx.nix
];
};
db = {
enable = true;
password = db_pass.matrix;
additionalDB = [
"matrix_mas"
];
};
logging = {
enable = true;
metricsEnable = true;
};
private = false;
auth = false;
otherDomains = [
{
subdomain = "chat";
port = 80;
private = false;
auth = false;
}
{
subdomain = "matrix";
port = 8008;
private = false;
auth = false;
customRule = "Host(`matrix#DOMAIN#`) && !(PathPrefix(`/_matrix/client/*/login`) || PathPrefix(`/_matrix/client/*/logout`) || PathPrefix(`/_matrix/client/*/refresh`))";
}
{
subdomain = "matrix_auth";
port = 8080;
private = false;
auth = false;
customRule = "Host(`matrix#DOMAIN#`) && (PathPrefix(`/_matrix/client/*/login`) || PathPrefix(`/_matrix/client/*/logout`) || PathPrefix(`/_matrix/client/*/refresh`))";
}
{
subdomain = "matrix-admin";
port = 5173;
private = true;
auth = false;
}
];
};
}