diff options
author | Ben Sima <ben@bsima.me> | 2024-04-01 13:30:45 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2024-04-01 13:30:45 -0400 |
commit | db373a8c727cad91d375b40a6c70b11ed73bdafb (patch) | |
tree | a7ed24e98242b6e38f44cb0c9884718d248cc613 /Biz/Cloud/Chat.nix | |
parent | 5c8ef1bf4dff4fc7c6e66a57673a81477bcc850a (diff) |
Add nixfmt to Lint.hs
nixfmt is the soon-to-be official formatter for Nix code, as per the NixOS
GitHub group. So I figure I should just adopt it without worrying too much about
the specifics of the formatting. I just formatted everything in one go, hence
the huge diff, oh well.
Diffstat (limited to 'Biz/Cloud/Chat.nix')
-rw-r--r-- | Biz/Cloud/Chat.nix | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/Biz/Cloud/Chat.nix b/Biz/Cloud/Chat.nix index be856d8..7f86621 100644 --- a/Biz/Cloud/Chat.nix +++ b/Biz/Cloud/Chat.nix @@ -24,21 +24,17 @@ in { enable = false; settings.server_name = config.networking.domain; #registration_shared_secret = "AkGRWSQLga3RoKRFnHhKoeCEIeZzu31y4TRzMRkMyRbBnETkVTSxilf24qySLzQn"; - settings.listeners = [ - { - port = matrix_port; - bind_address = "::1"; - type = "http"; - tls = false; - x_forwarded = true; - resources = [ - { - names = [ "client" "federation" ]; - compress = false; - } - ]; - } - ]; + settings.listeners = [{ + port = matrix_port; + bind_address = "::1"; + type = "http"; + tls = false; + x_forwarded = true; + resources = [{ + names = [ "client" "federation" ]; + compress = false; + }]; + }]; }; # matrix needs a database # @@ -55,23 +51,21 @@ in { # route to matrix-synapse "${config.networking.domain}" = { locations."= /.well-known/matrix/server".extraConfig = - let - server = { "m.server" = "${fqdn}:443"; }; + let server = { "m.server" = "${fqdn}:443"; }; in '' add_header Content-Type application/json; return 200 '${builtins.toJSON server}'; ''; - locations."= /.well-known/matrix/client".extraConfig = - let - client = { - "m.homeserver" = { "base_url" = "https://${fqdn}"; } ; - "m.identity_server" = { "base_url" = "https://vector.im"; }; - }; - in '' - add_header Content-Type application/json; - add_header Access-Control-Allow-Origin *; - return 200 '${builtins.toJSON client}'; - ''; + locations."= /.well-known/matrix/client".extraConfig = let + client = { + "m.homeserver" = { "base_url" = "https://${fqdn}"; }; + "m.identity_server" = { "base_url" = "https://vector.im"; }; + }; + in '' + add_header Content-Type application/json; + add_header Access-Control-Allow-Origin *; + return 200 '${builtins.toJSON client}'; + ''; }; # reverse proxy for matrix client-server and server-server communication "${fqdn}" = { |