Formatting

This commit is contained in:
batteredbunny 2024-03-05 21:21:27 +02:00 committed by batteredbunny
parent 2a027c493a
commit 2294646f61
5 changed files with 148 additions and 120 deletions

View file

@ -1,7 +1,11 @@
{config, pkgs, lib, inputs, ...}: let
{
config,
pkgs,
inputs,
...
}: let
settings = import ./settings.nix {};
# pkgs.schildichat-web
elementClient = pkgs.element-web.override {
conf = {
default_server_config = {
@ -12,14 +16,14 @@
wellKnownMatrix = ''
handle /.well-known/matrix/client {
header Content-Type application/json
header Access-Control-Allow-Origin *
header Content-Type application/json
header Access-Control-Allow-Origin *
respond `{"m.homeserver":{"base_url":"https://matrix.catnip.ee/"},"org.matrix.msc3575.proxy":{"url":"https://sliding-sync.catnip.ee"}}`
}
handle /.well-known/matrix/server {
header Content-Type application/json
header Access-Control-Allow-Origin *
respond `{"m.server": "matrix.catnip.ee:443"}`
header Content-Type application/json
header Access-Control-Allow-Origin *
respond `{"m.server": "matrix.catnip.ee:443"}`
}
'';
in {
@ -75,18 +79,17 @@ in {
}
'';
"files.catnip.ee" = {
extraConfig = ''
basicauth * {
mrow {env.FILES_PASSWORD_HASH}
}
"files.catnip.ee".extraConfig = ''
basicauth * {
mrow {env.FILES_PASSWORD_HASH}
}
root * /mnt/media
file_server browse {
hide .Trash-1000
}
'';
root * /mnt/media
file_server browse {
hide .Trash-1000
}
'';
};
"chat.catnip.ee".extraConfig = ''
root * ${elementClient}
file_server
@ -110,22 +113,22 @@ in {
'';
"ntfy.catnip.ee".extraConfig = ''
reverse_proxy ${config.services.ntfy-sh.settings.listen-http}
reverse_proxy ${config.services.ntfy-sh.settings.listen-http}
# Redirect HTTP to HTTPS, but only for GET topic addresses, since we want
# it to work with curl without the annoying https:// prefix.
@httpget {
protocol http
method GET
path_regexp ^/([-_a-z0-9]{0,64}$|docs/|static/)
}
redir @httpget https://{host}{uri}
# Redirect HTTP to HTTPS, but only for GET topic addresses, since we want
# it to work with curl without the annoying https:// prefix.
@httpget {
protocol http
method GET
path_regexp ^/([-_a-z0-9]{0,64}$|docs/|static/)
}
redir @httpget https://{host}{uri}
'';
"waka.catnip.ee".extraConfig = ''
reverse_proxy :${toString settings.ports.wakapi}
'';
# docker authentik
"auth.catnip.ee".extraConfig = ''
reverse_proxy :${toString settings.ports.authentik}