Compare commits

..

No commits in common. "1dd8651bda7ddde8d145143470b53900a7f5e947" and "485ed0fec2e892944845dd125a4cd3342f4ca8cc" have entirely different histories.

7 changed files with 10 additions and 151 deletions

View file

@ -33,7 +33,7 @@
"links": [
{
"name": "Wiki",
"url": "https://wiki.hamburg.ccc.de"
"url": "https://wiki.ccchh.net"
},
{
"name": "Git (Forgejo)",

View file

@ -28,7 +28,7 @@
];
locations."/" = {
return = "302 https://wiki.hamburg.ccc.de/club:c3cat:start";
return = "302 https://wiki.ccchh.net/club:c3cat:start";
};
extraConfig = ''

View file

@ -5,9 +5,7 @@
./branding-resources.hamburg.ccc.de.nix
./c3cat.de.nix
./element.hamburg.ccc.de.nix
./hamburg.ccc.de.nix
./next.hamburg.ccc.de.nix
./spaceapi.hamburg.ccc.de.nix
./staging.hamburg.ccc.de.nix
./www.hamburg.ccc.de.nix
];
}

View file

@ -49,7 +49,7 @@
"auth_header_logo_url": "https://branding-resources.hamburg.ccc.de/logo/ccchh-logo-no-background.png",
"auth_footer_links": [
{ "text": "Website", "url": "https://hamburg.ccc.de/" },
{ "text": "Wiki", "url": "https://wiki.hamburg.ccc.de/" },
{ "text": "Wiki", "url": "https://wiki.ccchh.net/" },
{ "text": "Status", "url": "https://status.ccchh.net/status/main" }
]
}

View file

@ -1,87 +0,0 @@
{ pkgs, ... }:
{
services.nginx.virtualHosts = {
"acme-hamburg.ccc.de" = {
enableACME = true;
serverName = "hamburg.ccc.de";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"hamburg.ccc.de" = {
forceSSL = true;
useACMEHost = "hamburg.ccc.de";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
root = "/var/www/hamburg.ccc.de/";
# Redirect the old spaceapi endpoint to the new one.
locations."/dooris/status.json" = {
return = "302 https://spaceapi.hamburg.ccc.de/";
};
# Redirect pages starting with 4 digits for redirecting the old blog
# article URLs.
# We want to redirect /yyyy/mm/dd/slug to /blog/yyyy/mm/dd/slug, but we
# just match the first 4 digits for simplicity.
locations."~ \"^/[\\d]{4}\"" = {
return = "302 https://$host/blog$request_uri";
};
# Redirect pages, which previously lived on the old website, to their
# successors in the wiki.
locations."/club/satzung" = {
return = "302 https://wiki.hamburg.ccc.de/verein:offizielles:satzung";
};
locations."/club/hausordnung" = {
return = "302 https://wiki.hamburg.ccc.de/verein:offizielles:hausordnung";
};
locations."/club/vertrauenspersonen" = {
return = "302 https://wiki.hamburg.ccc.de/verein:offizielles:vertrauenspersonen";
};
locations."/club/beitragsordnung" = {
return = "302 https://wiki.hamburg.ccc.de/verein:offizielles:beitragsordnung";
};
locations."/club/mitgliedschaft" = {
return = "302 https://wiki.hamburg.ccc.de/verein:offizielles:foemi-formular";
};
locations."/club/geschichte" = {
return = "302 https://wiki.hamburg.ccc.de/club:geschichte";
};
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;
'';
};
};
users.users.ccchh-website-deploy = {
isNormalUser = true;
group = "ccchh-website-deploy";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILX847OMjYC+he1nbV37rrdCQVGINFY43CwLjZDM9iyb ccchh website deployment key"
];
};
users.groups.ccchh-website-deploy = { };
}

View file

@ -2,9 +2,9 @@
{
services.nginx.virtualHosts = {
"acme-staging.hamburg.ccc.de" = {
"acme-next.hamburg.ccc.de" = {
enableACME = true;
serverName = "staging.hamburg.ccc.de";
serverName = "next.hamburg.ccc.de";
listen = [
{
@ -14,9 +14,9 @@
];
};
"staging.hamburg.ccc.de" = {
"next.hamburg.ccc.de" = {
forceSSL = true;
useACMEHost = "staging.hamburg.ccc.de";
useACMEHost = "next.hamburg.ccc.de";
listen = [
{
@ -27,13 +27,7 @@
}
];
root = "/var/www/staging.hamburg.ccc.de/";
# Disallow *, since this is staging and doesn't need to be in any search
# results.
locations."/robots.txt" = {
return = "200 \"User-agent: *\\nDisallow: *\\n\"";
};
root = "/var/www/next.hamburg.ccc.de/";
extraConfig = ''
# Make use of the ngx_http_realip_module to set the $remote_addr and
@ -52,7 +46,7 @@
isNormalUser = true;
group = "ccchh-website-deploy";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILX847OMjYC+he1nbV37rrdCQVGINFY43CwLjZDM9iyb ccchh website deployment key"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILX847OMjYC+he1nbV37rrdCQVGINFY43CwLjZDM9iyb next.hamburg.ccc.de deployment key"
];
};
users.groups.ccchh-website-deploy = { };

View file

@ -1,46 +0,0 @@
{ pkgs, ... }:
{
services.nginx.virtualHosts = {
"acme-www.hamburg.ccc.de" = {
enableACME = true;
serverName = "www.hamburg.ccc.de";
listen = [
{
addr = "0.0.0.0";
port = 31820;
}
];
};
"www.hamburg.ccc.de" = {
forceSSL = true;
useACMEHost = "www.hamburg.ccc.de";
listen = [
{
addr = "0.0.0.0";
port = 8443;
ssl = true;
proxyProtocol = true;
}
];
locations."/" = {
return = "302 https://hamburg.ccc.de$request_uri";
};
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;
'';
};
};
}