From a8b3805d175dd4e64f20793fd2ce1b003ea7ebc2 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 1 Nov 2021 18:23:59 -0400
Subject: [PATCH] Give the localdev cluster a new filesystem for the voucher
 database

---
 morph/lib/hardware-vagrant.nix | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/morph/lib/hardware-vagrant.nix b/morph/lib/hardware-vagrant.nix
index 150944cd..4c118f2d 100644
--- a/morph/lib/hardware-vagrant.nix
+++ b/morph/lib/hardware-vagrant.nix
@@ -31,6 +31,17 @@
       prefixLength = 24;
     }];
 
+    # The issuer configuration wants to read the location of its database
+    # directory from the filesystem configuration.  Since the Vagrant
+    # environment doesn't have separate volume-as-infrastructure management
+    # (maybe it could?  but why bother?) we do a bind-mount here so there is a
+    # configured value readable.  The database won't really have a dedicated
+    # volume but it will sort of appear as if it does.
+    fileSystems."voucher-database" = {
+      device = "/var/lib/origin-zkapissuer-vouchers";
+      mountPoint = "/var/lib/zkapissuer-vouchers";
+      options = ["bind"];
+    };
     fileSystems."/storage" = { fsType = "tmpfs"; };
     fileSystems."/" =
       { device = "/dev/sda1";
-- 
GitLab