Personal statsd, run under Bun, packaged as a home-manager / nix-darwin module.
Pre-implementation. Only the proof-of-concept exists today, in
zz-pocs/stats-me-poc/. The production
flake, package, and home-manager module are not yet built.
A drop-in module for ~/eng-style nix configurations that exposes
services.stats-me, runs a statsd daemon under launchd (macOS) or
systemd (Linux), defaults to the console backend with logs at the
XDG-spec path ($XDG_LOG_HOME/stats-me/stats-me.log,
defaulting to $HOME/.local/log/stats-me/stats-me.log), and lets the
user point at any pluggable backend later.
The POC validates one hypothesis: Bun can run upstream statsd/statsd
and receive UDP packets on macOS.
- ✅ Bun (1.3.11) executes
statsd/statsdstats.jsunmodified - ✅ The vendored statsd tree under
zz-pocs/stats-me-poc/vendor/statsdneeds nobun install— the optional native deps are not exercised by the console backend ⚠️ Bun's'listening'event is not a true readiness signal: the very first UDP packet sent immediately afterbind()is silently dropped. Subsequent packets work. Tests must spam or retry; production clients are UDP-loss-tolerant by design⚠️ nixos-25.11shipsbun-1.3.3, which has worse macOS dgram problems. The POC fetchesbun-1.3.11directly from upstream releases via afetchurlFOD. Production will need the same approach (or a real package once the toolchain catches up)
The full architecture plan, decision log, and verification gates live
in this session's planning notes; once implementation begins, design
notes will land under docs/.
.
├── flake.nix # inputs + outputs
├── default.nix # mkBunDerivation entry point
├── nix/hm/stats-me.nix # home-manager module
├── config/ # default config(s), e.g. console backend
├── vendor/statsd/ # vendored upstream statsd tree (graduated from POC)
└── zz-pocs/stats-me-poc/ # frozen POC, kept for future debugging
MIT for the stats-me wrapper code. The vendored statsd tree retains
its upstream MIT license — see vendor/statsd/LICENSE.