2022-01-17 15:59:51 +00:00
|
|
|
{
|
2022-06-12 15:39:15 +00:00
|
|
|
nix-packages,
|
|
|
|
system,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
homepage-old = nix-packages.packages.${system}.homepage-old;
|
|
|
|
in {
|
2022-01-17 16:01:38 +00:00
|
|
|
systemd.services.homepage-old = {
|
2022-01-17 15:59:51 +00:00
|
|
|
enable = true;
|
|
|
|
description = "darkkirb.de";
|
2022-06-12 15:37:09 +00:00
|
|
|
script = "${homepage-old}/homepage";
|
2022-01-17 15:59:51 +00:00
|
|
|
serviceConfig = {
|
2022-06-12 15:37:09 +00:00
|
|
|
WorkingDirectory = homepage-old;
|
2022-01-17 16:09:51 +00:00
|
|
|
EnvironmentFile = "/run/secrets/services/old-homepage";
|
2022-01-17 15:59:51 +00:00
|
|
|
};
|
2022-06-12 15:39:15 +00:00
|
|
|
wantedBy = ["multi-user.target"];
|
2022-01-17 15:59:51 +00:00
|
|
|
};
|
|
|
|
services.nginx.virtualHosts."darkkirb.de" = {
|
|
|
|
sslCertificate = "/var/lib/acme/darkkirb.de/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/darkkirb.de/key.pem";
|
2022-06-12 15:39:15 +00:00
|
|
|
serverAliases = ["www.darkkirb.de"];
|
2022-01-17 15:59:51 +00:00
|
|
|
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-02-09 14:24:07 +00:00
|
|
|
forceSSL = false;
|
2022-01-17 14:55:54 +00:00
|
|
|
addSSL = true;
|
2022-01-17 14:54:37 +00:00
|
|
|
sslCertificate = "/var/lib/acme/darkkirb.de/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/darkkirb.de/key.pem";
|
|
|
|
locations."/" = {
|
2022-04-25 08:15:24 +00:00
|
|
|
proxyPass = "https://f000.backblazeb2.com/file/darkkirb-de/";
|
2022-01-17 14:54:37 +00:00
|
|
|
};
|
|
|
|
};
|
2022-06-12 15:39:15 +00:00
|
|
|
sops.secrets."services/old-homepage" = {};
|
2022-01-17 14:54:37 +00:00
|
|
|
}
|