diff --git a/hosts/desktop.nix b/hosts/desktop.nix
index 25233e0..de98c63 100644
--- a/hosts/desktop.nix
+++ b/hosts/desktop.nix
@@ -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}
'';
diff --git a/hosts/elnudrop/README.md b/hosts/elnudrop/README.md
new file mode 100644
index 0000000..b6c2aa4
--- /dev/null
+++ b/hosts/elnudrop/README.md
@@ -0,0 +1,5 @@
+Remote rebuild:
+
+```SH
+ga -A . && nixos-rebuild switch --flake .#elnudrop --target-host root@elnudrop
+```
\ No newline at end of file
diff --git a/hosts/elnudrop/default.nix b/hosts/elnudrop/default.nix
index d29a299..116aede 100644
--- a/hosts/elnudrop/default.nix
+++ b/hosts/elnudrop/default.nix
@@ -11,6 +11,7 @@
./modules/tailscale.nix
./hosts/jichan.org
+ ./hosts/tegakituesday.com
];
networking.firewall = {
diff --git a/hosts/elnudrop/hosts/jichan.org/502/502.html b/hosts/elnudrop/hosts/jichan.org/502/502.html
index c1e085e..4858a48 100644
--- a/hosts/elnudrop/hosts/jichan.org/502/502.html
+++ b/hosts/elnudrop/hosts/jichan.org/502/502.html
@@ -3,13 +3,13 @@
-
+
jichan.org is offline
-
+
jichan.org 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!
diff --git a/hosts/elnudrop/hosts/jichan.org/default.nix b/hosts/elnudrop/hosts/jichan.org/default.nix
index 9cdf1b9..9c16b7a 100644
--- a/hosts/elnudrop/hosts/jichan.org/default.nix
+++ b/hosts/elnudrop/hosts/jichan.org/default.nix
@@ -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;
+ '';
+ };
};
};
}
\ No newline at end of file
diff --git a/hosts/elnudrop/hosts/jichan.org/502/missing.min.css b/hosts/elnudrop/hosts/shared/502/missing.min.css
similarity index 100%
rename from hosts/elnudrop/hosts/jichan.org/502/missing.min.css
rename to hosts/elnudrop/hosts/shared/502/missing.min.css
diff --git a/hosts/elnudrop/hosts/shared/README.md b/hosts/elnudrop/hosts/shared/README.md
new file mode 100644
index 0000000..2ec0504
--- /dev/null
+++ b/hosts/elnudrop/hosts/shared/README.md
@@ -0,0 +1 @@
+[missing.css@1.0.9](https://missing.style/)
\ No newline at end of file
diff --git a/hosts/elnudrop/hosts/tegakituesday.com/502/502.html b/hosts/elnudrop/hosts/tegakituesday.com/502/502.html
new file mode 100644
index 0000000..fc16162
--- /dev/null
+++ b/hosts/elnudrop/hosts/tegakituesday.com/502/502.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+ Tegaki Tuesday is offline
+
+
+
+
+
+ Tegaki Tuesday 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!
+