Compare commits

...

2 commits

Author SHA1 Message Date
uku
5e171d9c06
fix(etna): switch forgejo to vesuvio proxy
ssh url now matches https!!! yay!!!
2025-06-30 12:26:19 +02:00
uku
389f6b2e10
chore(vesuvio): change nginx config a bit 2025-06-30 12:14:40 +02:00
5 changed files with 88 additions and 84 deletions

View file

@ -91,35 +91,5 @@ in
}
];
};
nginx.virtualHosts."m.uku.moe".locations =
let
server = {
"m.server" = "m.uku.moe:443";
};
client = {
"m.homeserver"."base_url" = "https://m.uku.moe";
};
in
{
"=/.well-known/matrix/server" = {
return = "200 '${builtins.toJSON server}'";
};
"=/.well-known/matrix/client" = {
return = "200 '${builtins.toJSON client}'";
};
"/" = {
proxyPass = "http://localhost:8008";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 600;
client_max_body_size 100M;
'';
};
};
};
}

View file

@ -20,8 +20,6 @@ in
{
imports = [ secrets.generate ];
cfTunnels."git.uku3lig.net" = "http://localhost:3000";
services = {
forgejo = {
enable = true;
@ -42,9 +40,11 @@ in
server = {
ROOT_URL = "https://git.uku3lig.net";
HTTP_ADDR = "0.0.0.0";
HTTP_PORT = 3000;
START_SSH_SERVER = true;
BUILTIN_SSH_SERVER_USER = "git";
SSH_DOMAIN = "ssh.uku.moe";
SSH_DOMAIN = "git.uku3lig.net";
SSH_LISTEN_PORT = 2222;
};
@ -120,7 +120,7 @@ in
name = "forgejo-ssh";
type = "tcp";
localIp = "127.0.0.1";
localPort = 2222;
localPort = config.services.forgejo.settings.server.SSH_LISTEN_PORT;
remotePort = 22;
}
];

View file

@ -1,12 +1,7 @@
{ config, _utils, ... }:
let
frp = _utils.mkFrpPassthrough "immich" config.services.immich.port;
in
{
imports = [ frp ];
services.immich = {
enable = true;
host = "0.0.0.0";
settings = null;
mediaLocation = "/data/immich";

View file

@ -16,7 +16,6 @@
];
services = {
nginx.enable = true;
openssh = {
ports = [ 4269 ];
openFirewall = true;

View file

@ -1,52 +1,92 @@
{
services.nginx.virtualHosts = {
# default server
"vps.uku3lig.net" = {
default = true;
addSSL = true;
enableACME = true;
locations."/".return = "404";
};
# immich
"im.uku.moe" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:2283";
proxyWebsockets = true;
services.nginx = {
enable = true;
virtualHosts = {
# default server
"vps.uku3lig.net" = {
default = true;
addSSL = true;
enableACME = true;
locations."/".return = "404";
};
extraConfig = ''
client_max_body_size 5000M;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
'';
};
# immich
"im.uku.moe" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://etna:2283";
proxyWebsockets = true;
};
# dendrite
"m.uku.moe" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://etna:80";
recommendedProxySettings = true;
};
};
"zipline.uku3lig.net" = {
serverAliases = [ "v.uku.moe" ];
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://etna:3001";
recommendedProxySettings = true;
extraConfig = ''
client_max_body_size 5000M;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
'';
};
extraConfig = ''
client_max_body_size 1000M;
'';
# dendrite
"m.uku.moe" = {
forceSSL = true;
enableACME = true;
locations =
let
server = {
"m.server" = "m.uku.moe:443";
};
client = {
"m.homeserver"."base_url" = "https://m.uku.moe";
};
in
{
"=/.well-known/matrix/server" = {
return = "200 '${builtins.toJSON server}'";
};
"=/.well-known/matrix/client" = {
return = "200 '${builtins.toJSON client}'";
};
"/" = {
proxyPass = "http://etna:8008";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 600;
client_max_body_size 100M;
'';
};
};
};
"zipline.uku3lig.net" = {
serverAliases = [ "v.uku.moe" ];
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://etna:3001";
recommendedProxySettings = true;
};
extraConfig = ''
client_max_body_size 1000M;
'';
};
"git.uku3lig.net" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://etna:3000";
recommendedProxySettings = true;
};
};
};
};
# we depend on etna, which makes nginx fail if it's started before tailscale
systemd.services.nginx.after = [ "tailscaled.service" ];
}