Add old-homepage

This commit is contained in:
Charlotte 🦝 Delenk 2022-01-17 16:59:51 +01:00
parent 85003ce415
commit dba69c50ad
Signed by: darkkirb
GPG key ID: 015E3768A70AFBC5
2 changed files with 31 additions and 1 deletions

View file

@ -1,4 +1,33 @@
{ ... }: {
{ ... }:
let
homepage-old = import ../../package/old-homepage.nix { };
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 '*';";
};
};
services.nginx.virtualHosts."static.darkkirb.de" = {
addSSL = true;
http2 = true;

View file

@ -10,4 +10,5 @@
sops.secrets."services/minio_scrape" = {
owner = "prometheus";
};
sops.secrets."services/old-homepage" = { };
}