refactor(matrix.nix): centralize matrix-synapse secrets and remove hardcoded database name
- Added `age.secrets.matrix` to manage secrets in a centralized `.age` file - Removed hardcoded `db_name` and used `extraConfigFiles` to include the database configuration from the `.age` file - Updated comments to reflect changes
This commit is contained in:
parent
9b1cef61f2
commit
847677fc2f
@ -2,18 +2,22 @@
|
||||
|
||||
let
|
||||
domain = "runas.rocks";
|
||||
db_name = "matrix-synapse-runas.rocks";
|
||||
|
||||
utilities = import ./utilities.nix { inherit lib config; };
|
||||
inherit (utilities) architectInterfaceAddress;
|
||||
in
|
||||
{
|
||||
age.secrets.matrix = {
|
||||
file = ../../secrets/matrix-synapse.age;
|
||||
owner = "matrix-synapse";
|
||||
};
|
||||
|
||||
services = {
|
||||
matrix-synapse = {
|
||||
enable = true;
|
||||
# Database config is in the .age file
|
||||
extraConfigFiles = [ config.age.secrets.matrix.path ];
|
||||
settings = {
|
||||
server_name = "${domain}";
|
||||
database.args.database = db_name;
|
||||
public_baseurl = "https://${domain}";
|
||||
registration_shared_secret = "runas!";
|
||||
url_preview_enabled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user