rename nodes and add runner for gitea instance

This commit is contained in:
shobu
2025-11-11 21:05:47 +01:00
parent c610ce80bc
commit 542034054c
34 changed files with 69 additions and 24 deletions

60
hosts/sin/matrix.nix Normal file
View File

@@ -0,0 +1,60 @@
{pkgs, config, ...}:
{
users.users = {
postgres = {
isSystemUser = true;
};
matrix-synapse = {
isSystemUser = true;
};
};
services.postgresql = {
enable = true;
ensureDatabases = [ "matrix-synapse" ];
ensureUsers = [
{
name = "matrix-synapse";
ensureDBOwnership = true;
ensureClauses.login = true;
}
];
authentication = pkgs.lib.mkOverride 10 ''
#type #database #user #auth-method
local postgres all trust
local matrix-synapse matrix-synapse trust
'';
};
networking.firewall.allowedTCPPorts = [ 8008 8448 ];
services.matrix-synapse = {
enable = true;
settings = {
server_name = "matrix.shobu.fr";
public_baseurl = "https://matrix.shobu.fr/";
enable_registration = true;
enable_registration_captcha = true;
serve_server_wellknown = true;
listeners = [
{
port = 8008;
bind_addresses = ["0.0.0.0"];
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
compress = true;
}
];
}
];
};
extraConfigFiles = [
config.age.secrets.captcha.path
];
};
}