2022-01-17 15:59:51 +00:00
|
|
|
{
|
2022-06-12 15:39:15 +00:00
|
|
|
system,
|
2022-12-30 14:44:49 +00:00
|
|
|
pkgs,
|
2022-06-12 15:39:15 +00:00
|
|
|
...
|
|
|
|
}: let
|
2023-06-13 05:46:23 +00:00
|
|
|
inherit (pkgs) old-homepage;
|
2022-06-12 15:39:15 +00:00
|
|
|
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-09-30 15:46:21 +00:00
|
|
|
script = "${old-homepage}/homepage";
|
2022-01-17 15:59:51 +00:00
|
|
|
serviceConfig = {
|
2022-09-30 15:46:21 +00:00
|
|
|
WorkingDirectory = old-homepage;
|
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
|
|
|
};
|
2022-08-26 15:28:14 +00:00
|
|
|
services.caddy.virtualHosts."darkkirb.de" = {
|
|
|
|
useACMEHost = "darkkirb.de";
|
2022-12-30 13:03:57 +00:00
|
|
|
logFormat = pkgs.lib.mkForce "";
|
2022-08-26 15:28:14 +00:00
|
|
|
extraConfig = ''
|
|
|
|
import baseConfig
|
|
|
|
|
|
|
|
reverse_proxy {
|
|
|
|
to http://localhost:3002
|
|
|
|
trusted_proxies private_ranges
|
|
|
|
}
|
|
|
|
'';
|
2022-01-17 15:59:51 +00:00
|
|
|
};
|
2022-08-26 15:28:14 +00:00
|
|
|
services.caddy.virtualHosts."static.darkkirb.de" = {
|
|
|
|
useACMEHost = "darkkirb.de";
|
2022-12-30 13:03:57 +00:00
|
|
|
logFormat = pkgs.lib.mkForce "";
|
2022-08-26 15:28:14 +00:00
|
|
|
extraConfig = ''
|
|
|
|
import baseConfig
|
|
|
|
|
2022-08-28 15:20:46 +00:00
|
|
|
rewrite * /file/darkkirb-de{path}
|
2022-08-26 16:00:06 +00:00
|
|
|
|
2022-08-26 15:28:14 +00:00
|
|
|
reverse_proxy {
|
|
|
|
to https://f000.backblazeb2.com
|
|
|
|
header_up Host {upstream_hostport}
|
|
|
|
|
|
|
|
transport http {
|
2024-06-05 18:38:34 +00:00
|
|
|
versions 1.1
|
2022-08-26 15:28:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
'';
|
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
|
|
|
}
|