chore: apply nix fmt
This commit is contained in:
parent
caa6948199
commit
e2bd4444d2
47 changed files with 274 additions and 187 deletions
|
|
@ -7,20 +7,25 @@ let
|
|||
pgsqlEnable = config.machine.postgresql.enable;
|
||||
inherit (config.machine.synapse) enable;
|
||||
in
|
||||
with lib; mkIf enable {
|
||||
services.postgresql = with lib; mkIf pgsqlEnable {
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "matrix-synapse";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
ensureDatabases = [ "matrix-synapse" ];
|
||||
};
|
||||
with lib;
|
||||
mkIf enable {
|
||||
services.postgresql =
|
||||
with lib;
|
||||
mkIf pgsqlEnable {
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "matrix-synapse";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
ensureDatabases = [ "matrix-synapse" ];
|
||||
};
|
||||
services.matrix-synapse.settings.database = {
|
||||
name = if pgsqlEnable then "psycopg2" else "sqlite3";
|
||||
args = with lib; mkIf pgsqlEnable {
|
||||
host = "/run/postgresql";
|
||||
};
|
||||
args =
|
||||
with lib;
|
||||
mkIf pgsqlEnable {
|
||||
host = "/run/postgresql";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ let
|
|||
};
|
||||
};
|
||||
in
|
||||
with lib; mkIf enable {
|
||||
with lib;
|
||||
mkIf enable {
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ let
|
|||
;
|
||||
address = "noreply@${domain}";
|
||||
in
|
||||
with lib; mkIf (enable && config.machine.mail.enable) {
|
||||
with lib;
|
||||
mkIf (enable && config.machine.mail.enable) {
|
||||
services.matrix-synapse = {
|
||||
settings = {
|
||||
admin_contact = address;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ let
|
|||
redisEnable = config.machine.redis.enable;
|
||||
inherit (config.machine.synapse) enable;
|
||||
in
|
||||
with lib; mkIf (redisEnable && enable) {
|
||||
with lib;
|
||||
mkIf (redisEnable && enable) {
|
||||
services.redis.servers.matrix-synapse = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ let
|
|||
enable
|
||||
;
|
||||
in
|
||||
with lib; mkIf enable {
|
||||
with lib;
|
||||
mkIf enable {
|
||||
sops.secrets = {
|
||||
"matrix/registrationSharedSecret" = {
|
||||
sopsFile = ./../../secrets/common.yaml;
|
||||
|
|
@ -40,7 +41,9 @@ with lib; mkIf enable {
|
|||
smtp_pass: ${config.sops.placeholder."mail/servicePassword"}
|
||||
'';
|
||||
};
|
||||
services.matrix-synapse.extraConfigFiles = with lib; mkIf config.machine.synapse.enable [
|
||||
config.sops.templates.matrix-synapse-config.path
|
||||
];
|
||||
services.matrix-synapse.extraConfigFiles =
|
||||
with lib;
|
||||
mkIf config.machine.synapse.enable [
|
||||
config.sops.templates.matrix-synapse-config.path
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ let
|
|||
metrics
|
||||
;
|
||||
in
|
||||
with lib; mkIf enable {
|
||||
with lib;
|
||||
mkIf enable {
|
||||
services.matrix-synapse = {
|
||||
inherit enable;
|
||||
enableRegistrationScript = true;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
let
|
||||
inherit (config.machine.coturn) enable;
|
||||
in
|
||||
with lib; mkIf (enable && config.machine.coturn.enable) {
|
||||
with lib;
|
||||
mkIf (enable && config.machine.coturn.enable) {
|
||||
services.matrix-synapse.settings = with config.services.coturn; {
|
||||
turn_uris = [
|
||||
"turn:${realm}:3478?transport=udp"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue