From 9a5c4e7df793195cf5c5a572d2ef81df0e81f668 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Fri, 27 Sep 2019 14:15:01 -0400
Subject: [PATCH] remove extra indentation and let

---
 nixos/modules/issuer.nix | 40 +++++++++++++++++++---------------------
 1 file changed, 19 insertions(+), 21 deletions(-)

diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix
index 87082fdc..919768af 100644
--- a/nixos/modules/issuer.nix
+++ b/nixos/modules/issuer.nix
@@ -3,6 +3,7 @@
 { lib, pkgs, config, ... }: let
   pspkgs = pkgs.callPackage ./pspkgs.nix { };
   zkapissuer = pspkgs.callPackage ../pkgs/zkapissuer.nix { };
+  cfg = config.services.private-storage-issuer;
 in {
   options = {
     services.private-storage-issuer.enable = lib.mkEnableOption "PrivateStorage ZKAP Issuer Service";
@@ -33,28 +34,25 @@ in {
     };
   };
 
-  config = let
-    cfg = config.services.private-storage-issuer;
-  in
-    lib.mkIf cfg.enable {
-      systemd.services.zkapissuer = {
-        enable = true;
-        description = "ZKAP Issuer";
-        wantedBy = [ "multi-user.target" ];
-        after = [ "network.target" ];
+  config = lib.mkIf cfg.enable {
+    systemd.services.zkapissuer = {
+      enable = true;
+      description = "ZKAP Issuer";
+      wantedBy = [ "multi-user.target" ];
+      after = [ "network.target" ];
 
-        serviceConfig = {
-          ExecStart =
-            let
-              args =
-                if cfg.issuer == "Trivial"
-                  then "--issuer Trivial"
-                  else "--issuer Ristretto --signing-key ${cfg.ristrettoSigningKey}";
-            in
-              "${cfg.package}/bin/PaymentServer-exe ${args}";
-          Type = "simple";
-          Restart = "always";
-        };
+      serviceConfig = {
+        ExecStart =
+          let
+            args =
+              if cfg.issuer == "Trivial"
+                then "--issuer Trivial"
+                else "--issuer Ristretto --signing-key ${cfg.ristrettoSigningKey}";
+          in
+            "${cfg.package}/bin/PaymentServer-exe ${args}";
+        Type = "simple";
+        Restart = "always";
       };
     };
+  };
 }
-- 
GitLab