Kieran's opinionated (and probably slightly dumb) nix config
1# control
2
3Admin dashboard for Caddy feature toggles. Provides a web UI to enable/disable paths on other services (e.g. blocking player tracking on the map).
4
5**Domain:** `control.dunkirk.sh` · **Port:** 3010 · **Runtime:** bun
6
7## Extra options
8
9### `flags`
10
11Defines per-domain feature flags that control blocks paths and redacts JSON fields.
12
13```nix
14atelier.services.control.flags."map.dunkirk.sh" = {
15 name = "Map";
16 flags = {
17 "block-tracking" = {
18 name = "Block Player Tracking";
19 description = "Disable real-time player location updates";
20 paths = [
21 "/sse"
22 "/sse/*"
23 "/tiles/*/markers/pl3xmap_players.json"
24 ];
25 redact."/tiles/settings.json" = [ "players" ];
26 };
27 };
28};
29```
30
31| Option | Type | Default | Description |
32|--------|------|---------|-------------|
33| `flags` | attrsOf submodule | `{}` | Services and their feature flags, keyed by domain |
34| `flags.<domain>.name` | string | — | Display name for the service |
35| `flags.<domain>.flags.<id>.name` | string | — | Display name for the flag |
36| `flags.<domain>.flags.<id>.description` | string | — | What the flag does |
37| `flags.<domain>.flags.<id>.paths` | list of strings | `[]` | URL paths to block when flag is active |
38| `flags.<domain>.flags.<id>.redact` | attrsOf (list of strings) | `{}` | JSON fields to redact from responses, keyed by path |
39
40The flags config is serialized to `flags.json` and passed to control via the `FLAGS_CONFIG` environment variable.