From e3db3f777b96d748768ed9375ff777834cd0e914 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Fri, 27 Sep 2019 14:18:14 -0400
Subject: [PATCH] comments

---
 nixos/modules/issuer.nix | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix
index 919768af..7cb7cde1 100644
--- a/nixos/modules/issuer.nix
+++ b/nixos/modules/issuer.nix
@@ -10,7 +10,7 @@ in {
     services.private-storage-issuer.package = lib.mkOption {
       default = zkapissuer.components.exes."PaymentServer-exe";
       type = lib.types.package;
-      example = lib.literalExample "pkgs.zkapissuer";
+      example = lib.literalExample "pkgs.zkapissuer.components.exes.\"PaymentServer-exe\"";
       description = ''
         The package to use for the ZKAP issuer.
       '';
@@ -35,6 +35,7 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
+    # Add a systemd service to run PaymentServer.
     systemd.services.zkapissuer = {
       enable = true;
       description = "ZKAP Issuer";
@@ -44,6 +45,8 @@ in {
       serviceConfig = {
         ExecStart =
           let
+            # Compute the right command line arguments to pass to it.  The
+            # signing key is only supplied when using the Ristretto issuer.
             args =
               if cfg.issuer == "Trivial"
                 then "--issuer Trivial"
@@ -51,6 +54,9 @@ in {
           in
             "${cfg.package}/bin/PaymentServer-exe ${args}";
         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";
       };
     };
-- 
GitLab