noisebell/remote
2026-03-17 18:10:24 -07:00
..
cache-service feat: add assets for discord embedded messages 2026-03-17 18:10:24 -07:00
discord-bot feat: add assets for discord embedded messages 2026-03-17 18:10:24 -07:00
noisebell-common feat: reorganize with remote 2026-03-16 23:32:07 -07:00
rss-service fix: update the readmes to be more clear 2026-03-16 23:42:37 -07:00
Cargo.lock feat: reorganize with remote 2026-03-16 23:32:07 -07:00
Cargo.toml feat: reorganize with remote 2026-03-16 23:32:07 -07:00
flake.lock feat: reorganize with remote 2026-03-16 23:32:07 -07:00
flake.nix fix: configure workspace in remote 2026-03-16 23:58:23 -07:00
README.md fix: update the readmes to be more clear 2026-03-16 23:42:37 -07:00

Remote Services

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

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

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

Building

cargo build --release

Or with Nix:

nix build .#noisebell-cache
nix build .#noisebell-discord
nix build .#noisebell-rss

NixOS deployment

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

{
  inputs.noisebell.url = "git+https://git.extremist.software/jet/noisebell?dir=remote";

  outputs = { self, nixpkgs, noisebell, ... }: {
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        noisebell.nixosModules.default
        ({ ... }: {
          services.noisebell-cache = {
            enable = true;
            domain = "cache.noisebell.example.com";
            piAddress = "http://noisebell-pi:80";
            piApiKeyFile = "/run/secrets/noisebell-pi-api-key";
            inboundApiKeyFile = "/run/secrets/noisebell-inbound-api-key";
            outboundWebhooks = [{
              url = "http://localhost:3001/webhook";
              secretFile = "/run/secrets/noisebell-discord-webhook-secret";
            }];
          };
          services.noisebell-discord = {
            enable = true;
            domain = "discord.noisebell.example.com";
            discordTokenFile = "/run/secrets/noisebell-discord-token";
            channelId = "123456789012345678";
            webhookSecretFile = "/run/secrets/noisebell-discord-webhook-secret";
          };
          services.noisebell-rss = {
            enable = true;
            domain = "rss.noisebell.example.com";
            cacheUrl = "http://localhost:3000";
          };
        })
      ];
    };
  };
}