2023-05-19 11:42:43 +02:00
|
|
|
{ config, ... }:
|
2023-04-13 14:24:39 +02:00
|
|
|
let
|
2023-09-19 13:47:08 +02:00
|
|
|
domain = "purge.${config.networking.domain}";
|
2023-04-13 14:24:39 +02:00
|
|
|
in
|
|
|
|
{
|
2023-07-20 21:35:12 +02:00
|
|
|
sops.secrets."purge/token".owner = "purge";
|
2023-04-13 14:24:39 +02:00
|
|
|
services.purge = {
|
|
|
|
enable = true;
|
2023-05-29 13:31:20 +02:00
|
|
|
discord = {
|
|
|
|
clientId = "941041925216157746";
|
|
|
|
publicKey = "d2945f6130d9b4a8dda8c8bf52db5dee127a82f89c6b8782e84aa8f45f61d402";
|
2023-07-20 21:35:12 +02:00
|
|
|
tokenFile = config.sops.secrets."purge/token".path;
|
2023-05-29 13:31:20 +02:00
|
|
|
};
|
2023-04-13 14:24:39 +02:00
|
|
|
};
|
|
|
|
services.nginx.virtualHosts."${domain}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
2023-04-13 14:28:09 +02:00
|
|
|
proxyPass = "http://127.0.0.1:${toString config.services.purge.listenPort}";
|
2023-04-13 14:24:39 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|