o001 works finally

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-03-08 22:48:25 -06:00
parent bb9cd5d9c4
commit 5fd49b6456
10 changed files with 60 additions and 386 deletions

View file

@ -1,9 +1,7 @@
{
config,
...
}:
{
# JUST A TEST TODO remove
containers.wasabi = {
ephemeral = true;
@ -25,7 +23,7 @@
};
security.acme.acceptTerms = true;
security.acme.email = "admin@joshuabell.xyz";
security.acme.defaults.email = "admin@joshuabell.xyz";
services.nginx = {
enable = true;
recommendedGzipSettings = true;
@ -34,46 +32,46 @@
recommendedTlsSettings = true;
virtualHosts = {
# Redirect self IP to domain
"149.130.211.142" = {
"64.181.210.7" = {
locations."/" = {
return = "301 https://o001.joshuabell.xyz";
};
};
# "o001.joshuabell.xyz" = {
# enableACME = true;
# forceSSL = true;
# locations = {
# "/wasabi" = {
# proxyPass = "http://192.168.100.11/";
# extraConfig = ''
# rewrite ^/wasabi/(.*) /$1 break;
# '';
# };
# "/" = {
# # return = "200 '<html>Hello World</html>'";
# extraConfig = ''
# default_type text/html;
# return 200 '
# <html>
# <body style="width:100vw;height:100vh;overflow:hidden">
# <div style="display: flex;width:100vw;height:100vh;justify-content: center;align-items:center;text-align:center;overflow:hidden">
# In the void you roam,</br>
# A page that cannot be found-</br>
# Turn back, seek anew.
# </div>
# </body>
# </html>
# ';
# '';
# };
# };
# };
"o001.joshuabell.xyz" = {
enableACME = true;
forceSSL = true;
locations = {
"/wasabi" = {
proxyPass = "http://192.168.100.11/";
extraConfig = ''
rewrite ^/wasabi/(.*) /$1 break;
'';
};
"/" = {
# return = "200 '<html>Hello World</html>'";
extraConfig = ''
default_type text/html;
return 200 '
<html>
<body style="width:100vw;height:100vh;overflow:hidden">
<div style="display: flex;width:100vw;height:100vh;justify-content: center;align-items:center;text-align:center;overflow:hidden">
In the void you roam,</br>
A page that cannot be found-</br>
Turn back, seek anew.
</div>
</body>
</html>
';
'';
};
};
};
"_" = {
default = true;
locations."/" = {
return = "444"; # 404 for not found or 444 for drop
return = "404"; # 404 for not found or 444 for drop
};
};
};
@ -83,8 +81,4 @@
80 # web http
443 # web https
];
networking.firewall.allowedUDPPorts = [
# 4242 # nebula
];
}