Skip to content

feat(self-host): Nix flake and NixOS module for Maple Local - #2410

Merged
Makisuo merged 5 commits into
mainfrom
feat/nix-flake-nixos-module
Nov 9, 2026
Merged

Makisuo merged 5 commits into
mainfrom
feat/nix-flake-nixos-module

fix(nix): reject --data-dir=, cover the empty-secret refusal in the V…

5b5c911
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 9, 2026 in 2m 15s

Confidence 8/10 · No issues found

🟢 Confidence 8/10 · likely safe to merge. Held at 8 because 1 reviewed file was not read.
1 note · tests covered · risk medium · 1 file not read · 1 fix not yet re-checked against the whole diff

Adds a Nix flake and a services.maple NixOS module that run the released Maple Local bundle under systemd, with a NixOS VM test, a release-pin job and docs. Confined to new packaging files; nothing to fix before merge. flake.lock was not read (lockfile).

  • flake.nix packages the released bundle and exports nixosModules.maple
  • services.maple runs maple start under systemd with LoadCredential secrets
  • The bin/maple wrapper refuses update and sets MAPLE_NO_UPDATE_CHECK=1
  • A release job re-pins nix/release.json and dispatches the Nix check

Still open from earlier reviews

  • 🔵 Note · F2 · overlays.default yields maple as an unfree package that throws on evaluate · flake.nix:42

Fixed since the last review

  • ✅ F3 · Empty-secret refusal (exit 78) is not covered by the VM test

Production impact

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
flake.nix 2.3k maple 2.3k/day, 2.0% err
nix/module.nix 2.3k maple 2.3k/day, 2.0% err
nix/package.nix 2.3k maple 2.3k/day, 2.0% err
nix/test.nix 2.3k maple 2.3k/day, 2.0% err
scripts/update-nix-release.sh 2.3k maple 2.3k/day, 2.0% err
What was checked
  • Empty-secret refusal: load_secret exits 78 and nix/test.nix:80-91 drops in an empty token, asserting status 78 and failed
  • Start script matches apps/cli/docker/entrypoint.sh; dirty-store probe path data/backups/state.json confirmed in apps/cli/test/checkpoints.test.ts:1156
  • Release pin name/target pairs match what scripts/update-nix-release.sh and the build matrix upload, libchdb.so on every platform
Files not reviewed (1)

The review ended before it read these diffs, so nothing above vouches for them.

  • flake.lock

5b5c911 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.