commit cf79e0fae8af15a04f0e361d0faf1924fe85c223
parent fe61951ca417a9c899411848c535011eed775463
Author: Silas Brack <silasbrack@gmail.com>
Date: Sun, 7 Jun 2026 19:17:30 +0200
feat: add FTS5 search via direct SQLite access
Pass DB_PATH to simple-web-app and bind-mount the trailbase data
directory read-only so the app can query the story_fts table directly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/flake.lock b/flake.lock
@@ -318,11 +318,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
- "lastModified": 1780849438,
- "narHash": "sha256-07CXRbfTBu0pMj6sDSIetvsIW9kPGlpZgAVCUpByg8g=",
+ "lastModified": 1780852153,
+ "narHash": "sha256-k8qfVYDuHay0nYXAksp1vWdJLvkG94CbPLJJDH5GBQ4=",
"ref": "refs/heads/main",
- "rev": "e57ad4bcdeca11e8c57bf6e874ea0d8adb511c09",
- "revCount": 76,
+ "rev": "f1647057e14243a9e3d5b0e0151fd2ec6ee92842",
+ "revCount": 77,
"type": "git",
"url": "ssh://forgejo@git.fnarglebeast.com/silas/simple-web-app.git"
},
diff --git a/modules/simple-web-app.nix b/modules/simple-web-app.nix
@@ -87,11 +87,13 @@ in
ExecStart = "${cfg.package}/bin/simple-web-app";
DynamicUser = true;
StateDirectory = "simple-web-app";
+ BindReadOnlyPaths = [ "/var/lib/simple-web-app-trailbase/traildepot/data" ];
};
environment = {
PORT = builtins.toString cfg.port;
DEBUG = "false";
TRAILBASE_URL = "http://127.0.0.1:${builtins.toString cfg.trailbasePort}";
+ DB_PATH = "/var/lib/simple-web-app-trailbase/traildepot/data/main.db";
RUST_LOG = "info";
};
};