diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-01-11 16:38:39 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-01-11 16:38:39 -0600 |
| commit | b560049e1e9866c5a9f16e4a749194411d64a11b (patch) | |
| tree | 47297a9614e87096c8c287b1f9cf513e701d5611 /sys/web/sites | |
| parent | 344884ab44642af52a23a69137f87a289ae8f71f (diff) | |
flake, sys: remove conduit
Diffstat (limited to '')
| -rw-r--r-- | sys/web/sites/default.nix | 1 | ||||
| -rw-r--r-- | sys/web/sites/matrix.nix | 52 |
2 files changed, 0 insertions, 53 deletions
diff --git a/sys/web/sites/default.nix b/sys/web/sites/default.nix index 15957c0..a131aaf 100644 --- a/sys/web/sites/default.nix +++ b/sys/web/sites/default.nix @@ -1,7 +1,6 @@ { imports = [ ./home.nix - ./matrix.nix ./portal.nix ]; } diff --git a/sys/web/sites/matrix.nix b/sys/web/sites/matrix.nix deleted file mode 100644 index 5583b47..0000000 --- a/sys/web/sites/matrix.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, lib, ... }: -with lib; let - cfg = config.local.web.sites.matrix; - inherit (config.local) domains; -in -{ - options.local.web.sites.matrix = { - enable = mkEnableOption "matrix proxy site"; - - proxyUrl = mkOption { - type = types.str; - }; - }; - - config = mkIf cfg.enable { - local.web = { - enable = mkDefault true; - ownedCerts = [ "matrix" ]; - - sites.portal.enable = true; - }; - - services.nginx.virtualHosts = - let - proxyLocation = - throwIf (hasSuffix "/" cfg.proxyUrl) - "matrix site: a trailing slash *must not* be used here" - cfg.proxyUrl; - in - { - ${domains.exdev.main}.locations."/.well-known/matrix".proxyPass = proxyLocation; - - ${domains.matrix.main} = { - forceSSL = true; - useACMEHost = domains.matrix.main; - - locations = { - "/".extraConfig = '' - return 403; - ''; - - # Forward all Matrix API calls to the synapse Matrix homeserver. A trailing slash - # *must not* be used here. - "/_matrix".proxyPass = proxyLocation; - - # Forward requests for e.g. SSO and password-resets. - "/_synapse/client".proxyPass = proxyLocation; - }; - }; - }; - }; -} |
