diff --git a/DEPLOYMENT-NOTES.rst b/DEPLOYMENT-NOTES.rst index cf447ece2798c26fefc0cb41a9636dfa93a2c08d..d5e7d88b12b9751706425c802569ccb52bfed10d 100644 --- a/DEPLOYMENT-NOTES.rst +++ b/DEPLOYMENT-NOTES.rst @@ -19,11 +19,11 @@ Deployment notes 3. Create a labeled filesystem on the partition :: - mkfs.ext4 -L voucher-database /dev/nvme1n1p1 + mkfs.ext4 -L zkapissuer-database /dev/nvme1n1p1 4. Mount the new filesystem :: - systemctl restart var-lib-voucher-database.mount + systemctl restart var-lib-zkapissuer-database.mount 5. Deploy the PrivateStorageio update. diff --git a/morph/lib/hardware-vagrant.nix b/morph/lib/hardware-vagrant.nix index 11fda31fc7e9f4f42606b97bc67fc83af28d1c15..36ecc5b66bb482b30bc3b0d4126e1caf053f9de0 100644 --- a/morph/lib/hardware-vagrant.nix +++ b/morph/lib/hardware-vagrant.nix @@ -37,12 +37,12 @@ # (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. - services.private-storage-issuer.voucherFileSystem = { + services.private-storage-issuer.databaseFileSystem = { device = "/var/lib/origin-zkapissuer-v2"; options = ["bind"]; }; - # XXX This should be handled by the storage module like voucher-database + # XXX This should be handled by the storage module like zkapissuer-database # is handled by the issuer module. fileSystems."/storage" = { fsType = "tmpfs"; }; diff --git a/morph/lib/issuer-aws.nix b/morph/lib/issuer-aws.nix index 7c8f22a1c0887be4efe95399196b4623a1507393..85070bd94264f552b76d63bf37ebc5dd19a37873 100644 --- a/morph/lib/issuer-aws.nix +++ b/morph/lib/issuer-aws.nix @@ -22,8 +22,8 @@ # beyond control of this particular part of the system) for the # PaymentServer voucher database. This makes it easier to manage for # tasks like backup/recovery and encryption. - services.private-storage-issuer.voucherFileSystem = { - label = "voucher-database"; + services.private-storage-issuer.databaseFileSystem = { + label = "zkapissuer-database"; }; # Clean up packages after a while diff --git a/morph/lib/issuer.nix b/morph/lib/issuer.nix index 925d2bbf25654432efcd628819647904844116d3..c4515b378cc1439070ac58f686852a31ed1650b6 100644 --- a/morph/lib/issuer.nix +++ b/morph/lib/issuer.nix @@ -55,6 +55,6 @@ in { ristrettoSigningKeyPath = config.deployment.secrets.ristretto-signing-key.destination; stripeSecretKeyPath = config.deployment.secrets.stripe-secret-key.destination; database = "SQLite3"; - databasePath = "${config.fileSystems."voucher-database".mountPoint}/vouchers.sqlite3"; + databasePath = "${config.fileSystems."zkapissuer-database".mountPoint}/vouchers.sqlite3"; }; } diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix index 66d799c8f3c43e36add9509a161048b79e44dd93..82a286229b73ab674fc2aba74a07f27be267554e 100644 --- a/nixos/modules/issuer.nix +++ b/nixos/modules/issuer.nix @@ -81,13 +81,13 @@ in { The kind of voucher database to use. ''; }; - services.private-storage-issuer.voucherFileSystem = lib.mkOption { + services.private-storage-issuer.databaseFileSystem = lib.mkOption { # Logically, the type is the type of an entry in fileSystems - but we'll # just let the type system enforce that when we pass the value on to # fileSystems. description = '' - Configuration for a filesystem to mount which will hold the voucher - database. + Configuration for a filesystem to mount which will hold the issuer's + internal state database. ''; }; services.private-storage-issuer.databasePath = lib.mkOption { @@ -135,7 +135,7 @@ in { in lib.mkIf cfg.enable { # Make sure the voucher database filesystem is mounted. fileSystems = { - "voucher-database" = cfg.voucherFileSystem // { + "zkapissuer-database" = cfg.databaseFileSystem // { mountPoint = "/var/lib/${stateDirectory}"; }; };