extremist-software/modules/noisebell.nix

55 lines
1.7 KiB
Nix

{ config, inputs, ... }:
{
users.groups.noisebell = {};
users.users.noisebell-cache.extraGroups = [ "noisebell" ];
users.users.noisebell-discord.extraGroups = [ "noisebell" ];
age.secrets.noisebell-pi-to-cache-key = {
file = "${inputs.noisebell}/secrets/pi-to-cache-key.age";
group = "noisebell";
mode = "0440";
};
age.secrets.noisebell-cache-to-pi-key = {
file = "${inputs.noisebell}/secrets/cache-to-pi-key.age";
group = "noisebell";
mode = "0440";
};
age.secrets.noisebell-discord-token = {
file = "${inputs.noisebell}/secrets/discord-token.age";
group = "noisebell";
mode = "0440";
};
age.secrets.noisebell-discord-webhook-secret = {
file = "${inputs.noisebell}/secrets/discord-webhook-secret.age";
group = "noisebell";
mode = "0440";
};
services.noisebell-cache = {
enable = true;
port = 3003;
domain = "noisebell.extremist.software";
piAddress = "http://noisebell:80";
piApiKeyFile = config.age.secrets.noisebell-cache-to-pi-key.path;
inboundApiKeyFile = config.age.secrets.noisebell-pi-to-cache-key.path;
outboundWebhooks = [
{ url = "https://discord.noisebell.extremist.software/webhook"; secretFile = config.age.secrets.noisebell-discord-webhook-secret.path; }
];
};
services.noisebell-discord = {
enable = true;
port = 3004;
domain = "discord.noisebell.extremist.software";
discordTokenFile = config.age.secrets.noisebell-discord-token.path;
channelId = "1034916379486322718";
webhookSecretFile = config.age.secrets.noisebell-discord-webhook-secret.path;
};
services.noisebell-rss = {
enable = true;
domain = "rss.noisebell.extremist.software";
cacheUrl = "http://localhost:3003";
};
}