diff --git a/morph/grid/local/grid.nix b/morph/grid/local/grid.nix index 46cb9c8ec1dc5278823c9e3ffc405289e7510469..59880af8b91173ec8c4480f459ed6c862474ba38 100644 --- a/morph/grid/local/grid.nix +++ b/morph/grid/local/grid.nix @@ -129,6 +129,7 @@ let in { network = { description = "PrivateStorage.io LocalDev Grid"; + inherit (gridlib) pkgs; }; inherit payments monitoring storage1 storage2; } diff --git a/morph/grid/production/grid.nix b/morph/grid/production/grid.nix index 6009be84fb2a7ed7ca63e2e73b4f08f1f45ecb0d..3e0d41a5e6caabdc2c958f7bad0ae0ff10243c92 100644 --- a/morph/grid/production/grid.nix +++ b/morph/grid/production/grid.nix @@ -130,6 +130,7 @@ let in { network = { description = "PrivateStorage.io Production Grid"; + inherit (gridlib) pkgs; }; inherit payments; inherit monitoring; diff --git a/morph/grid/testing/grid.nix b/morph/grid/testing/grid.nix index 18983f0b32d28f13981b56475d7691a8cb434808..383fe740674992042a899ac391c100640ad5dcd7 100644 --- a/morph/grid/testing/grid.nix +++ b/morph/grid/testing/grid.nix @@ -81,6 +81,7 @@ let in { network = { description = "PrivateStorage.io Testing Grid"; + inherit (gridlib) pkgs; }; inherit payments monitoring storage001; } diff --git a/morph/lib/base.nix b/morph/lib/base.nix index 271766d9cff5253f6d9a72e475dec3398b2cd6b3..377ff80ca3eb3d0c4c87a09a3c2ffddb22217f20 100644 --- a/morph/lib/base.nix +++ b/morph/lib/base.nix @@ -32,5 +32,18 @@ # Instead, just tell morph how to reach the node here - by using its fully # qualified domain name. deployment.targetHost = "${config.networking.hostName}.${config.networking.domain}"; + + assertions = [ + # This is a check to save somebody in the future trying to debug why + # setting `nixpkgs.config` is not having an effect. + { + # `{}` is the default value for `nixpkgs.config` + assertion = config.nixpkgs.config == {}; + message = '' + Since we set `nixpkgs.pkgs` via morph's `network.pkgs`, the value for `nixpkgs.config` is ignored. + See https://whetstone.privatestorage.io/privatestorage/PrivateStorageio/-/issues/85#note_15876 for details. + ''; + } + ]; }; } diff --git a/morph/lib/default.nix b/morph/lib/default.nix index bf25e5a58d04d148296bffef48acc4e4e125684b..34f5e8b5171f211ededf38efb25440769113a8e4 100644 --- a/morph/lib/default.nix +++ b/morph/lib/default.nix @@ -17,4 +17,16 @@ customize-monitoring = import ./customize-monitoring.nix; modules = builtins.toString ../../nixos/modules; + + # The nixpkgs version used in our deployments. This affects both the packages + # installed, as well as the NixOS module set that is used. + # This is intended to be used in a grid definition like: + # network = { ... ; inherit (gridlib) pkgs; ... } + pkgs = import ../../nixpkgs-2105.nix { + # Ensure that configuration of the system where this runs + # doesn't leak into what we build. + # See https://github.com/NixOS/nixpkgs/issues/62513 + config = {}; + overlays = []; + }; }