diff --git a/morph/grid/testing/config.json b/morph/grid/testing/config.json index eca13fe1dd76fb37ea0a7b900b725217d33b970e..fb72b9137ad42603efa8ad4b8b85057a4d2c2664 100644 --- a/morph/grid/testing/config.json +++ b/morph/grid/testing/config.json @@ -1,6 +1,7 @@ { "publicStoragePort": 8898 , "ristrettoSigningKeyPath": "../../PrivateStorageSecrets/ristretto.signing-key" , "stripeSecretKeyPath": "../../PrivateStorageSecrets/privatestorageio-testing-stripe.secret" +, "pass-value": 1000000 , "issuerDomain": "payments.privatestorage-staging.com" , "letsEncryptAdminEmail": "jean-paul@privatestorage.io" , "allowedChargeOrigins": [ diff --git a/nixos/modules/private-storage.nix b/nixos/modules/private-storage.nix index c454dd2cef024a1e487a1935bc729fc0482371cd..0754a0723a026aaea4f24974f8b4dd98eac483b9 100644 --- a/nixos/modules/private-storage.nix +++ b/nixos/modules/private-storage.nix @@ -78,6 +78,15 @@ in The path to the Ristretto signing key for the service. ''; }; + services.private-storage.passValue = lib.mkOption + { default = null; + type = lib.types.nullOr lib.types.int; + example = lib.literalExample (1000 * 1000); + description = '' + The bytes component of the bytes×time value of a single pass which + storage servers will use when making pricing decisions. + ''; + }; }; # Define configuration based on values given for our options - starting with @@ -126,7 +135,11 @@ in "storageserver.plugins.privatestorageio-zkapauthz-v1" = { "ristretto-issuer-root-url" = cfg.issuerRootURL; "ristretto-signing-key-path" = cfg.ristrettoSigningKeyPath; - }; + } // ( + if cfg.passValue == null + then {} + else { "pass-value" = (toString cfg.passValue); } + ); }; };