Compare commits

...

5 Commits

@ -59,7 +59,9 @@ in
networking.extraHosts = ''
192.168.0.26 elnuhub
192.168.0.26 elnuhub.local
24.199.72.8 elnudrop
24.199.72.8 elnudrop.local
${tailscale.hosts}
'';

@ -0,0 +1,5 @@
Remote rebuild:
```SH
ga -A . && nixos-rebuild switch --flake .#elnudrop --target-host root@elnudrop
```

@ -11,6 +11,7 @@
./modules/tailscale.nix
./hosts/jichan.org
./hosts/tegakituesday.com
];
networking.firewall = {

@ -3,13 +3,13 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="missing.min.css"> <!-- missing.css@1.0.9 -->
<link rel="stylesheet" href="/missing.min.css">
<style>:root { cursor: inherit } button { cursor: pointer }</style>
<title>jichan.org is offline</title>
</head>
<body>
<main>
<img src="logo.svg" alt="Logo" style="height: 4em; display: block; margin: 1em auto 1em auto">
<img src="/logo.svg" alt="Logo" style="height: 4em; display: block; margin: 1em auto 1em auto">
<p class="<h3>">
<b>jichan.org</b> is currently offline for maintenance or due to an electrical outage.
Thank you for your patience and please check back soon. Sorry for the inconvenience!

@ -1,18 +1,39 @@
{
services.nginx.virtualHosts."jichan.org" = {
with import ../../../../modules/tailscale/default.nix;
let host = "jichan.org"; in {
services.nginx.virtualHosts."www.${host}" = {
forceSSL = true;
enableACME = true;
globalRedirect = host;
};
services.nginx.virtualHosts."${host}" = {
forceSSL = true;
enableACME = true;
extraConfig = ''
error_page 502 /502.html;
'';
locations = {
"/" = {
proxyPass = with import ../../../../modules/tailscale/default.nix; "http://${elnuhub}:3334";
proxyWebsockets = true;
};
"/".proxyPass = "http://${elnuhub}:3334";
"/502.html".root = "${./502}";
"/logo.svg".root = "${./502}";
"/missing.min.css".root = "${./502}";
"/missing.min.css".root = "${../shared/502}";
# Formerly tatoeba.elnu.com
# https://git.elnu.com/ElnuDev/tatoeba-api
"/api/tatoeba/" = {
proxyPass = "http://${elnuhub}:3001";
extraConfig = ''
rewrite ^/api/tatoeba/(.*) /$1 break;
'';
};
# Formerly images.elnu.com
# https://git.elnu.com/ElnuDev/image-api
"/api/images/" = {
proxyPass = "http://${elnuhub}:3002";
extraConfig = ''
rewrite ^/api/images/(.*) /$1 break;
'';
};
};
};
}

@ -0,0 +1 @@
[missing.css@1.0.9](https://missing.style/)

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/missing.min.css">
<style>:root { cursor: inherit } button { cursor: pointer }</style>
<title>Tegaki Tuesday is offline</title>
</head>
<body>
<main>
<img src="/mascot.png" alt="字ちゃん" style="height: 12em; display: block; margin: 1em auto 1em auto">
<p class="<h3>">
<b>Tegaki Tuesday</b> is currently offline for maintenance or due to an electrical outage.
Thank you for your patience and please check back soon. Sorry for the inconvenience!
</p>
<p lang="ja" class="<h4>">
現在、<b>手書きの火曜日</b>はメンテナンスのため、または停電のためオフラインとなっております。
しばらくお待ちください。ご迷惑をおかけして申し訳ございません!
</p>
<p class="text-align:center">Prolonged outage? <a href="https://discord.com/users/441283734214279178">Notify me on Discord.</a></p>
</main>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 KiB

@ -0,0 +1,21 @@
with import ../../../../modules/tailscale/default.nix;
let host = "tegakituesday.com"; in {
services.nginx.virtualHosts."www.${host}" = {
forceSSL = true;
enableACME = true;
globalRedirect = host;
};
services.nginx.virtualHosts."${host}" = {
forceSSL = true;
enableACME = true;
extraConfig = ''
error_page 502 /502.html;
'';
locations = {
"/".proxyPass = "http://${elnuhub}:3335";
"/502.html".root = "${./502}";
"/mascot.png".root = "${./502}";
"/missing.min.css".root = "${../shared/502}";
};
};
}

@ -3,6 +3,8 @@ rec {
elnudrop = "100.64.0.2";
elnuhub = "100.64.0.3";
hosts = ''
elnu ${elnu}
${elnu} elnu.elnu.com
${elnudrop} elnudrop.elnu.com
${elnuhub} elnuhub.elnu.com
'';
}
Loading…
Cancel
Save