diff --git a/morph/lib/issuer.nix b/morph/lib/issuer.nix index 2c30f075f8c717bb16ae30673836704d107e5205..2399310a31072b4f47eb248a72cfea8cb57dbed5 100644 --- a/morph/lib/issuer.nix +++ b/morph/lib/issuer.nix @@ -54,6 +54,6 @@ rec { ristrettoSigningKeyPath = deployment.secrets.ristretto-signing-key.destination; stripeSecretKeyPath = deployment.secrets.stripe-secret-key.destination; database = "SQLite3"; - databasePath = "/var/db/vouchers.sqlite3"; + databasePath = "/var/lib/zkapissuer/vouchers.sqlite3"; }; } diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix index f28bec2d3aa135ec78e1a8b29568aada69a5344d..2666f452f72d8deca85b68a93364c5f1b133d352 100644 --- a/nixos/modules/issuer.nix +++ b/nixos/modules/issuer.nix @@ -162,6 +162,13 @@ in { Group = "zkapissuer"; }; + # Make systemd create a User/Group owned directory for PaymentServer + # state. According to the docs at + # https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory= + # "The specified directory names must be relative" ... this + # makes systemd create /var/lib/zkapissuer/ for us: + serviceConfig.StateDirectory = "zkapissuer"; + script = let # Compute the right command line arguments to pass to it. The