diff --git a/.circleci/config.yml b/.circleci/config.yml
index bce71be3651c54320a1b45203bebab51e30aba8f..691a231518ffe4c9e7aed7b3f75ee862d8de8170 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -31,18 +31,21 @@ jobs:
       # time of this comment.  We can bump it to a newer version when that
       # makes sense.  Meanwhile, the platform won't shift around beneath us
       # unexpectedly.
-      NIXPKGS_REV: "8bf142e001b6876b021c8ee90c2c7cec385fe8e9"
+      NIXPKGS_REV: "92609f3d9bc3acffbdbe54fa1c591a885612aa73"
 
     steps:
       - run:
-          # Get NIX_PATH set for the rest of the job so that the revision of
-          # nixpkgs we selected will be used everywhere Nix pulls in software.
-          # There is no way to set an environment variable containing the
-          # value of another environment variable on CircleCI except to use
-          # the `BASH_ENV` feature as we do here.
-          name: "Setup NIX_PATH Environment Variable"
+          name: "Setup Environment Variables"
           command: |
+            # Get NIX_PATH set for the rest of the job so that the revision of
+            # nixpkgs we selected will be used everywhere Nix pulls in software.
+            # There is no way to set an environment variable containing the
+            # value of another environment variable on CircleCI except to use
+            # the `BASH_ENV` feature as we do here.
             echo "export NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXPKGS_REV.tar.gz" >> $BASH_ENV
+            # Set XDG_CONFIG_DIRS to point at the source directory, so that nix
+            # will pickup nix/nix.conf as a configuration file from there.
+            echo "export XDG_CONFIG_DIRS=$CIRCLE_WORKING_DIRECTORY" >> $BASH_ENV
 
       # Get *our* source code.
       - "checkout"
@@ -84,15 +87,15 @@ jobs:
             # If nixpkgs changes then potentially a lot of cached packages for
             # the base system will be invalidated so we may as well drop them
             # and make a new cache with the new packages.
-            - paymentserver-nix-store-v3-{{ checksum "nixpkgs.rev" }}-{{ checksum "nix/challenge-bypass-ristretto-repo.nix" }}
-            - paymentserver-nix-store-v3-{{ checksum "nixpkgs.rev" }}-
-            - paymentserver-nix-store-v3-
+            - paymentserver-nix-store-v5-{{ checksum "nixpkgs.rev" }}-{{ checksum "nix/challenge-bypass-ristretto-repo.nix" }}
+            - paymentserver-nix-store-v5-{{ checksum "nixpkgs.rev" }}-
+            - paymentserver-nix-store-v5-
 
       - run:
           name: "Building with Nix"
           command: |
             nix-build \
-              --option extra-substituters https://hydra.iohk.io/ \
+              -j 4 \
               ./nix/ \
               -A PaymentServer.components.exes."PaymentServer-exe"
 
@@ -100,7 +103,7 @@ jobs:
           name: "Building Tests"
           command: |
             nix-build \
-              --option extra-substituters https://hydra.iohk.io/ \
+              -j 4 \
               ./nix/ \
               -A PaymentServer.components.tests."PaymentServer-tests"
 
@@ -111,7 +114,7 @@ jobs:
 
       - save_cache:
           name: "Cache Nix Store Paths"
-          key: paymentserver-nix-store-v3-{{ checksum "nixpkgs.rev" }}-{{ checksum "nix/challenge-bypass-ristretto-repo.nix" }}
+          key: paymentserver-nix-store-v5-{{ checksum "nixpkgs.rev" }}-{{ checksum "nix/challenge-bypass-ristretto-repo.nix" }}
           paths:
             - "/nix"
 
diff --git a/nix/default.nix b/nix/default.nix
index b52284fd92a5b2bd1babdde01f54130aeff5a6df..b244f5e858d1a3a85d3f99732853704b193779d3 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -21,7 +21,7 @@ let
     # haskell.nix provides access to the nixpkgs pins which are used by our CI,
     # hence you will be more likely to get cache hits when using these.
     # But you can also just use your own, e.g. '<nixpkgs>'.
-    haskellNix.sources.nixpkgs-2009
+    haskellNix.sources.nixpkgs-2105
     # These arguments passed to nixpkgs, include some patches and also
     # the haskell.nix functionality itself as an overlay.
     (haskellNix.nixpkgsArgs // { overlays = allOverlays; });
diff --git a/nix/materialized.paymentserver/PaymentServer.nix b/nix/materialized.paymentserver/PaymentServer.nix
index 3d837110bfbc9cf104050f9b21846acd86000382..e77024c3f3ce41bf84ff5a0390d25744852739ce 100644
--- a/nix/materialized.paymentserver/PaymentServer.nix
+++ b/nix/materialized.paymentserver/PaymentServer.nix
@@ -132,4 +132,6 @@
           };
         };
       };
-    } // rec { src = (pkgs.lib).mkDefault ./.; }
\ No newline at end of file
+    } // rec {
+    src = (pkgs.lib).mkDefault ./.;
+    }
\ No newline at end of file
diff --git a/nix/materialized.paymentserver/default.nix b/nix/materialized.paymentserver/default.nix
index b7dc4236c2e74d4cb38eca2b7a23c22caf38b008..0408f477451e16468db5420efc25cef4aa51e5b1 100644
--- a/nix/materialized.paymentserver/default.nix
+++ b/nix/materialized.paymentserver/default.nix
@@ -9,6 +9,12 @@
         servant-prometheus = ./.stack-to-nix.cache.0;
         };
       };
-  resolver = "lts-14.1";
-  modules = [ ({ lib, ... }: { packages = {}; }) { packages = {}; } ];
+  resolver = "lts-14.2";
+  modules = [
+    ({ lib, ... }:
+      { packages = {}; })
+    { packages = {}; }
+    ({ lib, ... }:
+      { planned = lib.mkOverride 900 true; })
+    ];
   }
\ No newline at end of file
diff --git a/nix/nix.conf b/nix/nix.conf
new file mode 100644
index 0000000000000000000000000000000000000000..021bd60958ae4c441a26574778100c3864032963
--- /dev/null
+++ b/nix/nix.conf
@@ -0,0 +1,8 @@
+# nix.conf for usage in CI.
+
+# Add privatestorage's and haskell.nix[1] nix caches for builds.
+# [1] https://input-output-hk.github.io/haskell.nix/tutorials/getting-started/#setting-up-the-binary-cache
+extra-substituters = http://saxtons.private.storage/ https://hydra.iohk.io/
+# We needed to explictly specify the key for cache.nixos.org until we are using a version of nix
+# that has https://github.com/NixOS/nix/commit/ff4dea63c9403880500f82ce273713ecf793d2d9
+trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= saxtons.private.storage:MplOcEH8G/6mRlhlKkbA8GdeFR3dhCFsSszrspE/ZwY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
diff --git a/nix/sources.json b/nix/sources.json
index 932cb5f684179d78aad1e5354e3e20ce9006a079..fc5bbbbb6468aed32a38328e7577a4fd2a54c2a9 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -5,10 +5,10 @@
         "homepage": "https://input-output-hk.github.io/haskell.nix",
         "owner": "input-output-hk",
         "repo": "haskell.nix",
-        "rev": "61e89b7df59893612fed2ed66cc1405312fde56c",
-        "sha256": "0fm2rgmv7lm870jxaaajgi1f944a98akj3i361zjyxp4gw1y1ybk",
+        "rev": "f624ca56629d5be438c7d44a721b0c1d944eda23",
+        "sha256": "0529blc9ck19vnk235ap9g0vi8afmaw9i22a4v6w1gq37mz2p6hb",
         "type": "tarball",
-        "url": "https://github.com/input-output-hk/haskell.nix/archive/61e89b7df59893612fed2ed66cc1405312fde56c.tar.gz",
+        "url": "https://github.com/input-output-hk/haskell.nix/archive/f624ca56629d5be438c7d44a721b0c1d944eda23.tar.gz",
         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
     },
     "niv": {
@@ -24,15 +24,15 @@
         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
     },
     "nixpkgs": {
-        "branch": "release-20.03",
+        "branch": "release-21.05",
         "description": "Nix Packages collection",
         "homepage": "",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "246b75a0d0d7da135a3e62c686b98975c30df42c",
-        "sha256": "0px8k4lh5nhq6f7pxqw8yawl5494njv22z4rmssywqkanf1xjs32",
+        "rev": "92609f3d9bc3acffbdbe54fa1c591a885612aa73",
+        "sha256": "09n9j2lr8632xrslpwsk4222xcq7h1f7lj0vjc2b90v3c64hqwml",
         "type": "tarball",
-        "url": "https://github.com/NixOS/nixpkgs/archive/246b75a0d0d7da135a3e62c686b98975c30df42c.tar.gz",
+        "url": "https://github.com/NixOS/nixpkgs/archive/92609f3d9bc3acffbdbe54fa1c591a885612aa73.tar.gz",
         "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
     }
 }
diff --git a/stack.yaml b/stack.yaml
index 920873ef7e71303fd45aa2172a0c57fb8957cd49..d3514f56a5b1808c7afcff23fee44487f4f2532c 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -17,7 +17,7 @@
 #
 # resolver: ./custom-snapshot.yaml
 # resolver: https://example.com/snapshots/2018-01-01.yaml
-resolver: lts-14.1
+resolver: lts-14.2
 
 # User packages to be built.
 # Various formats can be used as shown in the example below.