From f6488d79383869e52d80c2715663217d80403802 Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@private.storage>
Date: Wed, 14 Jul 2021 16:08:38 +0000
Subject: [PATCH] Upgrade all local dev hosts to nixos-21.05

---
 morph/grid/local/grid.nix         | 1 +
 nixos/modules/issuer.nix          | 4 +++-
 nixos/modules/private-storage.nix | 7 +++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/morph/grid/local/grid.nix b/morph/grid/local/grid.nix
index bca902f2..5d05da12 100644
--- a/morph/grid/local/grid.nix
+++ b/morph/grid/local/grid.nix
@@ -71,6 +71,7 @@ let
 in {
   network = {
     description = "PrivateStorage.io LocalDev Grid";
+    pkgs = import ../../../stable2105.nix { };
   };
   inherit payments monitoring storage1 storage2;
 }
diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix
index fb93ce35..f28f8f6c 100644
--- a/nixos/modules/issuer.nix
+++ b/nixos/modules/issuer.nix
@@ -2,6 +2,8 @@
 # ZKAPs.
 { lib, pkgs, config, ... }: let
   cfg = config.services.private-storage-issuer;
+  # Our own nixpkgs fork:
+  ourpkgs = import (builtins.fetchTarball (builtins.fromJSON (builtins.readFile ../../nixpkgs.json))) { };
 in {
   imports = [
     # Give it a good SSH configuration.
@@ -11,7 +13,7 @@ in {
   options = {
     services.private-storage-issuer.enable = lib.mkEnableOption "PrivateStorage ZKAP Issuer Service";
     services.private-storage-issuer.package = lib.mkOption {
-      default = pkgs.zkapissuer.components.exes."PaymentServer-exe";
+      default = ourpkgs.zkapissuer.components.exes."PaymentServer-exe";
       type = lib.types.package;
       example = lib.literalExample "pkgs.zkapissuer.components.exes.\"PaymentServer-exe\"";
       description = ''
diff --git a/nixos/modules/private-storage.nix b/nixos/modules/private-storage.nix
index 38e22470..4f6561a0 100644
--- a/nixos/modules/private-storage.nix
+++ b/nixos/modules/private-storage.nix
@@ -8,6 +8,9 @@ let
   # TODO: This path copied from tahoe.nix.
   tahoe-base = "/var/db/tahoe-lafs";
 
+  # Our own nixpkgs fork:
+  ourpkgs = import (builtins.fetchTarball (builtins.fromJSON (builtins.readFile ../../nixpkgs.json))) { };
+
   # The full path to the directory where the storage server will write
   # incident reports.
   incidents-dir = "${tahoe-base}/${storage-node-name}/logs/incidents";
@@ -37,7 +40,7 @@ in
   options =
   { services.private-storage.enable = lib.mkEnableOption "private storage service";
     services.private-storage.tahoe.package = lib.mkOption
-    { default = pkgs.privatestorage;
+    { default = ourpkgs.privatestorage;
       type = lib.types.package;
       example = lib.literalExample "pkgs.tahoelafs";
       description = ''
@@ -160,7 +163,7 @@ in
 
     environment.systemPackages = [
       # Provide a useful tool for reporting about shares.
-      pkgs.leasereport
+      ourpkgs.leasereport
     ];
 
   };
-- 
GitLab