refactor(nixos): bfs: some secrets

This commit is contained in:
2025-12-07 02:25:29 +00:00
parent 082b80f252
commit 1beb980b95
27 changed files with 757 additions and 91 deletions

View File

@@ -2,33 +2,43 @@
cfg = config.currentServer.matrix;
in {
options = {
currentServer.matrix = {
postgresql = {
port = lib.mkOption {
type = lib.types.port;
default = 5432;
description = ''
postgres port
'';
};
initialEnvFile = lib.mkOption {
type = lib.types.path;
description = ''
path to env file with postgresql initial secrets
content:
POSTGRESQL_PASSWORD=
'';
};
};
matrixDomain = lib.mkOption {
type = lib.types.str;
description = ''
domain to matrix
'';
};
currentServer.matrix = {
secretsFile = lib.mkOption {
type = lib.types.path;
description = ''
path to env file with matrix secrets
content:
registration_shared_secret:
macroon_secret_key
form_secret
'';
};
postgresql = {
port = lib.mkOption {
type = lib.types.port;
default = 5432;
description = ''
postgres port
'';
};
initialEnvFile = lib.mkOption {
type = lib.types.path;
description = ''
path to env file with postgresql initial secrets
content:
POSTGRESQL_PASSWORD=
'';
};
};
matrixDomain = lib.mkOption {
type = lib.types.str;
description = ''
domain to matrix
'';
};
};
};
config = {
services.matrix-synapse = {
@@ -59,9 +69,9 @@ in {
enable_registration = true;
enable_registration_without_verification = true;
registration_shared_secret = "secret1";
macaroon_secret_key = "secret2";
form_secret = "secret3";
extraConfigFiles = [
cfg.secretsFile
];
};
};