infrastructure

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 43fc7b0297304a552c65203816458a2064fe5c39
parent 20ddc9462d5f49de0a2cb059205be78d4efe799a
Author: Silas Brack <silasbrack@gmail.com>
Date:   Fri, 12 Jun 2026 23:12:05 +0200

fix: drop volume bind mount, use StateDirectory for DB

BindPaths + DynamicUser + symlinks was a losing battle.
Use StateDirectory='simple-web-app/data' which systemd creates
and owns correctly. Volume mount can be revisited later with a
static user if needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Diffstat:
Mmodules/simple-web-app.nix | 9+--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/modules/simple-web-app.nix b/modules/simple-web-app.nix @@ -56,15 +56,8 @@ in Type = "simple"; ExecStart = "${cfg.package}/bin/simple-web-app"; DynamicUser = true; - StateDirectory = "simple-web-app"; + StateDirectory = "simple-web-app/data"; StateDirectoryMode = "0755"; - ExecStartPre = let - setupScript = pkgs.writeShellScript "simple-web-app-setup" '' - mkdir -p /mnt/volume-hel1-1/simple-web-app/data - mkdir -p /var/lib/private/simple-web-app/data - ''; - in "+${setupScript}"; - BindPaths = [ "/mnt/volume-hel1-1/simple-web-app/data:/var/lib/private/simple-web-app/data" ]; }; environment = { PORT = builtins.toString cfg.port;