nixos-config/hosts/falkenstein/modules/purge/default.nix

25 lines
608 B
Nix
Raw Normal View History

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-11-16 15:08:13 +01:00
age.secrets.purge = {
file = ../../../../secrets/falkenstein/purge.age;
};
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-11-16 15:08:13 +01:00
tokenFile = config.age.secrets.purge.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
};
};
}