2022-01-17 15:59:51 +00:00
|
|
|
{ ... }:
|
|
|
|
let
|
2022-01-17 16:00:34 +00:00
|
|
|
homepage-old = import ../../packages/old-homepage.nix { };
|
2022-01-17 15:59:51 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
system.services.homepage-old = {
|
|
|
|
enable = true;
|
|
|
|
description = "darkkirb.de";
|
|
|
|
script = "${homepage-old.homepage-old}/homepage";
|
|
|
|
serviceConfig = {
|
|
|
|
WorkingDirectory = homepage-old.homepage-old;
|
|
|
|
EnvFile = "/run/secrets/services/old-homepage";
|
|
|
|
};
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
};
|
|
|
|
services.nginx.virtualHosts."darkkirb.de" = {
|
|
|
|
forceSSL = true;
|
|
|
|
http2 = true;
|
|
|
|
listenAddresses = [ "0.0.0.0" "[::]" ];
|
|
|
|
sslCertificate = "/var/lib/acme/darkkirb.de/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/darkkirb.de/key.pem";
|
|
|
|
serverAliases = [ "www.darkkirb.de" ];
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:3002/";
|
|
|
|
};
|
|
|
|
locations."/.well-known/matrix" = {
|
|
|
|
proxyPass = "http://localhost:3002/.well-known/matrix";
|
|
|
|
extraConfig = "add_header Access-Control-Allow-Origin '*';";
|
|
|
|
};
|
|
|
|
};
|
2022-01-17 14:54:37 +00:00
|
|
|
services.nginx.virtualHosts."static.darkkirb.de" = {
|
2022-01-17 14:55:54 +00:00
|
|
|
addSSL = true;
|
2022-01-17 14:54:37 +00:00
|
|
|
http2 = true;
|
|
|
|
listenAddresses = [ "0.0.0.0" "[::]" ];
|
|
|
|
sslCertificate = "/var/lib/acme/darkkirb.de/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/darkkirb.de/key.pem";
|
|
|
|
locations."/" = {
|
2022-01-17 15:04:15 +00:00
|
|
|
proxyPass = "http://127.0.0.1:9000/darkkirb.de/";
|
2022-01-17 14:54:37 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|