README.md

Remote Services

Cargo workspace with the server-side pieces of Noisebell. Runs on any Linux box.

ServicePortWhat it does
cache-service/3000Polls the Pi, stores history in SQLite, fans out webhooks
discord-bot/3001Posts door status to a Discord channel
rss-service/3002Serves an Atom feed of door events
noisebell-common/—Shared types and helpers

See each service's README for configuration and API docs.

Building

sh
1cargo build --release

Or with Nix:

sh
1nix build .#noisebell-cache
2nix build .#noisebell-discord
3nix build .#noisebell-rss

NixOS deployment

The flake exports NixOS modules. Each service runs as a hardened systemd unit behind Caddy.

nix
1{
2 inputs.noisebell.url = "git+https://git.extremist.software/jet/noisebell?dir=remote";
3
4 outputs = { self, nixpkgs, noisebell, ... }: {
5 nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
6 system = "x86_64-linux";
7 modules = [
8 noisebell.nixosModules.default
9 ({ ... }: {
10 services.noisebell-cache = {
11 enable = true;
12 domain = "cache.noisebell.example.com";
13 piAddress = "http://noisebell-pi:80";
14 piApiKeyFile = "/run/secrets/noisebell-pi-api-key";
15 inboundApiKeyFile = "/run/secrets/noisebell-inbound-api-key";
16 outboundWebhooks = [{
17 url = "http://localhost:3001/webhook";
18 secretFile = "/run/secrets/noisebell-discord-webhook-secret";
19 }];
20 };
21 services.noisebell-discord = {
22 enable = true;
23 domain = "discord.noisebell.example.com";
24 discordTokenFile = "/run/secrets/noisebell-discord-token";
25 channelId = "123456789012345678";
26 webhookSecretFile = "/run/secrets/noisebell-discord-webhook-secret";
27 };
28 services.noisebell-rss = {
29 enable = true;
30 domain = "rss.noisebell.example.com";
31 cacheUrl = "http://localhost:3000";
32 };
33 })
34 ];
35 };
36 };
37}