Compare commits

...

2 Commits

Author SHA1 Message Date
f46ad8a2f3 feat: revive minecraft server 😋 2025-08-17 00:02:32 +08:00
c14a3682ff fix(tuwunel): delegation 2025-08-17 00:02:01 +08:00
3 changed files with 18 additions and 55 deletions

View File

@@ -18,52 +18,31 @@
server_name = "imxyy.top";
allow_registration = true;
registration_token_file = config.sops.secrets.tuwunel-reg-token.path;
well_known = {
server = "matrix.imxyy.top:443";
client = "https://matrix.imxyy.top";
};
};
};
services.caddy.virtualHosts."imxyy.top" = {
extraConfig = ''
handle /.well-known/matrix/client {
handle /.well-known/matrix/server {
header Content-Type application/json
header "Access-Control-Allow-Origin" "*"
respond `{"m.homeserver": {"base_url": "https://matrix.imxyy.top"}}` 200
respond `{"m.server": "matrix.imxyy.top:443"}` 200
}
'';
};
services.caddy.virtualHosts."imxyy.top:8448" = {
extraConfig = ''
reverse_proxy :8094
handle /.well-known/matrix/client {
header Content-Type application/json
header "Access-Control-Allow-Origin" "*"
respond `{"m.homeserver": {"base_url": "https://matrix.imxyy.top"}}` 200
respond `{"m.homeserver": {"base_url": "https://matrix.imxyy.top/"}}` 200
}
'';
};
services.caddy.virtualHosts."matrix.imxyy.top" = {
extraConfig = ''
reverse_proxy :8094
handle /.well-known/matrix/client {
header Content-Type application/json
header "Access-Control-Allow-Origin" "*"
respond `{"m.homeserver": {"base_url": "https://matrix.imxyy.top"}}` 200
}
'';
};
services.caddy.virtualHosts."matrix.imxyy.top:8448" = {
extraConfig = ''
reverse_proxy :8094
handle /.well-known/matrix/client {
header Content-Type application/json
header "Access-Control-Allow-Origin" "*"
respond `{"m.homeserver": {"base_url": "https://matrix.imxyy.top"}}` 200
}
'';
};
}

View File

@@ -1,6 +1,5 @@
{ lib, pkgs, ... }:
{
/*
systemd.services."fabric1.20.6" = {
description = "fabric 1.20.6 minecraft server";
wantedBy = [ "multi-user.target" ];
@@ -12,7 +11,7 @@
RestartSec = 120;
};
};
*/
my.persist = {
nixosDirs = [
"/opt/minecraft"

View File

@@ -405,13 +405,6 @@
localPort = 443;
customDomains = [ "matrix.imxyy.top" ];
}
{
name = "matrix-fed";
type = "tcp";
localIP = "127.0.0.1";
localPort = 8448;
remotePort = 8448;
}
{
name = "immich-http";
@@ -442,14 +435,6 @@
localPort = 443;
customDomains = [ "memo.imxyy.top" ];
}
{
name = "minecraft";
type = "tcp";
localIP = "127.0.0.1";
localPort = 25565;
remotePort = 25565;
}
];
};
};