This commit is contained in:
2024-11-05 12:48:30 +01:00
parent d8db7df64e
commit c9a024840b
20 changed files with 301 additions and 70 deletions

View File

@@ -1,7 +1,12 @@
{ pkgs, lib, config, ... }:
let
domain = "cloonar.com";
domain = config.networking.domain;
dataDir = "/var/www/${domain}";
mkWellKnown = data: ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON data}';
'';
in {
services.nginx.virtualHosts."${domain}" = {
forceSSL = true;
@@ -44,6 +49,10 @@ in {
locations."~ [^/]\.php(/|$)".extraConfig = ''
deny all;
'';
# matrix
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown { "m.server" = "matrix.cloonar.com:443"; };
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown { "m.homeserver".base_url = "https://matrix.cloonar.com"; };
};
users.users."${domain}" = {
isNormalUser = true;