Skip to content
Snippets Groups Projects
Commit e3db3f77 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

comments

parent 9a5c4e7d
No related branches found
No related tags found
1 merge request!10End-to-end with ristretto
...@@ -10,7 +10,7 @@ in { ...@@ -10,7 +10,7 @@ in {
services.private-storage-issuer.package = lib.mkOption { services.private-storage-issuer.package = lib.mkOption {
default = zkapissuer.components.exes."PaymentServer-exe"; default = zkapissuer.components.exes."PaymentServer-exe";
type = lib.types.package; type = lib.types.package;
example = lib.literalExample "pkgs.zkapissuer"; example = lib.literalExample "pkgs.zkapissuer.components.exes.\"PaymentServer-exe\"";
description = '' description = ''
The package to use for the ZKAP issuer. The package to use for the ZKAP issuer.
''; '';
...@@ -35,6 +35,7 @@ in { ...@@ -35,6 +35,7 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Add a systemd service to run PaymentServer.
systemd.services.zkapissuer = { systemd.services.zkapissuer = {
enable = true; enable = true;
description = "ZKAP Issuer"; description = "ZKAP Issuer";
...@@ -44,6 +45,8 @@ in { ...@@ -44,6 +45,8 @@ in {
serviceConfig = { serviceConfig = {
ExecStart = ExecStart =
let let
# Compute the right command line arguments to pass to it. The
# signing key is only supplied when using the Ristretto issuer.
args = args =
if cfg.issuer == "Trivial" if cfg.issuer == "Trivial"
then "--issuer Trivial" then "--issuer Trivial"
...@@ -51,6 +54,9 @@ in { ...@@ -51,6 +54,9 @@ in {
in in
"${cfg.package}/bin/PaymentServer-exe ${args}"; "${cfg.package}/bin/PaymentServer-exe ${args}";
Type = "simple"; Type = "simple";
# It really shouldn't ever exit on its own! If it does, it's a bug
# we'll have to fix. Restart it and hope it doesn't happen too much
# before we can fix whatever the issue is.
Restart = "always"; Restart = "always";
}; };
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment