WIP: serve old easterhegg pages from public-web-static host

This commit is contained in:
christian 2024-02-19 00:28:51 +01:00
parent 85951e2e59
commit 797b9a8a37
Signed by: c6ristian
SSH key fingerprint: SHA256:B3m+yzpaxGXSEcDBpPHfvza/DNC0wuX+CKMeGq8wgak
7 changed files with 292 additions and 0 deletions

View file

@ -9,5 +9,6 @@
./spaceapi.hamburg.ccc.de.nix
./staging.hamburg.ccc.de.nix
./www.hamburg.ccc.de.nix
./historic-easterhegg
];
}

View file

@ -0,0 +1,11 @@
{...}:
{
imports = [
./eh03.easterhegg.eu.nix
./eh05.easterhegg.eu.nix
./eh07.easterhegg.eu.nix
./eh09.easterhegg.eu.nix
./eh11.easterhegg.eu.nix
];
}

View file

@ -0,0 +1,56 @@
{ pkgs, ... }:
let
eh03 = builtins.fetchGit {
url = "forgejo@git.hamburg.ccc.de:CCCHH/easterhegg-2003-website.git";
ref = "main";
rev = "7c5249671be88e9bfa6ca51ea1a906b75a2bcece";
};
in
{
services.nginx.virtualHosts = {
"acme-eh03.easterhegg.eu" = {
enableACME = true;
serverName = "eh03.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"eh03.easterhegg.eu" = {
forceSSL = true;
useACMEHost = "eh03.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
root = pkgs.buildEnv {
name = "eh03";
paths = [
eh03
];
};
extraConfig = ''
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
'';
};
};
}

View file

@ -0,0 +1,56 @@
{ pkgs, ... }:
let
eh05 = builtins.fetchGit {
url = "forgejo@git.hamburg.ccc.de:CCCHH/easterhegg-2005-website.git";
ref = "main";
rev = "ef633b2cf45d72205c840935e036c16b57517e8b";
};
in
{
services.nginx.virtualHosts = {
"acme-eh05.easterhegg.eu" = {
enableACME = true;
serverName = "eh05.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"eh05.easterhegg.eu" = {
forceSSL = true;
useACMEHost = "eh05.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
root = pkgs.buildEnv {
name = "eh05";
paths = [
eh05
];
};
extraConfig = ''
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
'';
};
};
}

View file

@ -0,0 +1,56 @@
{ pkgs, ... }:
let
eh07 = builtins.fetchGit {
url = "forgejo@git.hamburg.ccc.de:CCCHH/easterhegg-2007-website.git";
ref = "main";
rev = "50cd064c6329a38ad2e9c1a4a8d4b37abd171b53";
};
in
{
services.nginx.virtualHosts = {
"acme-eh07.easterhegg.eu" = {
enableACME = true;
serverName = "eh07.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"eh07.easterhegg.eu" = {
forceSSL = true;
useACMEHost = "eh07.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
root = pkgs.buildEnv {
name = "eh07";
paths = [
eh07
];
};
extraConfig = ''
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
'';
};
};
}

View file

@ -0,0 +1,56 @@
{ pkgs, ... }:
let
eh09 = builtins.fetchGit {
url = "forgejo@git.hamburg.ccc.de:CCCHH/easterhegg-2009-website.git";
ref = "main";
rev = "30498f6b2cba4f2c37db810f1bc2b98638ac9f05";
};
in
{
services.nginx.virtualHosts = {
"acme-eh09.easterhegg.eu" = {
enableACME = true;
serverName = "eh09.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"eh09.easterhegg.eu" = {
forceSSL = true;
useACMEHost = "eh09.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
root = pkgs.buildEnv {
name = "eh09";
paths = [
eh09
];
};
extraConfig = ''
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
'';
};
};
}

View file

@ -0,0 +1,56 @@
{ pkgs, ... }:
let
eh11 = builtins.fetchGit {
url = "forgejo@git.hamburg.ccc.de:CCCHH/easterhegg-2011-website.git";
ref = "main";
rev = "3df97af36394f93514913f2be7e84c9b6bff1b1c";
};
in
{
services.nginx.virtualHosts = {
"acme-eh11.easterhegg.eu" = {
enableACME = true;
serverName = "eh11.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"eh11.easterhegg.eu" = {
forceSSL = true;
useACMEHost = "eh11.easterhegg.eu";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
root = pkgs.buildEnv {
name = "eh11";
paths = [
eh11
];
};
extraConfig = ''
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
'';
};
};
}