diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix index c9424785ba94d9c6c16f5e5e636706240b316b2d..b032100f1f20f04f174aa8f03faf5bf22a97b226 100644 --- a/nixos/modules/issuer.nix +++ b/nixos/modules/issuer.nix @@ -38,6 +38,15 @@ in { algorithm or Ristretto for Ristretto-flavored PrivacyPass. ''; }; + services.private-storage-issuer.tokensPerVoucher = lib.mkOption { + default = null; + type = lib.types.nullOr lib.types.int; + example = 50000; + description = '' + If not null, a value to pass to PaymentServer for + ``--tokens-per-voucher``. + ''; + }; services.private-storage-issuer.ristrettoSigningKeyPath = lib.mkOption { default = null; type = lib.types.path; @@ -210,8 +219,10 @@ in { "--stripe-endpoint-domain ${cfg.stripeEndpointDomain} " + "--stripe-endpoint-scheme ${cfg.stripeEndpointScheme} " + "--stripe-endpoint-port ${toString cfg.stripeEndpointPort}"; + + redemptionConfig = lib.optionalString (cfg.tokensPerVoucher != null) "--tokens-per-voucher ${builtins.toString cfg.tokensPerVoucher}"; in - "${cfg.package.exePath} ${originArgs} ${issuerArgs} ${databaseArgs} ${httpArgs} ${stripeArgs}"; + "${cfg.package.exePath} ${originArgs} ${issuerArgs} ${databaseArgs} ${httpArgs} ${stripeArgs} ${redemptionConfig}"; }; # PaymentServer runs as this user and group by default