Skip to content
Snippets Groups Projects
Commit 025c6841 authored by Tom Prince's avatar Tom Prince
Browse files

Merge branch 'fast-eval' into 'develop'

Speed up evaluation of grids by evaluating custom packages once.

See merge request !246
parents a0417c64 56372538
No related branches found
No related tags found
2 merge requests!264merge develop into production,!246Speed up evaluation of grids by evaluating custom packages once.
Pipeline #1691 passed
......@@ -26,6 +26,13 @@
"megacli"
];
};
overlays = [];
# Expose `nixos/pkgs` as an attribute of our package set.
# This is is primarly consumed by `nixos/modules/packages.nix`, which
# then exposes it as a module argument. We do this here, so that
# the package set only needs to be evaluted once for the grid, rather
# than once for each host.
overlays = [
(self: super: { ourpkgs = self.callPackage ../../nixos/pkgs {}; })
];
};
}
# A NixOS module which exposes custom packages to other modules.
{ pkgs, ...}:
let
ourpkgs = pkgs.callPackage ../../nixos/pkgs {};
# Get our custom packages; either from the nixpkgs attribute added via an
# overlay in `morph/lib/default.nix`, or by importing them directly.
ourpkgs = pkgs.ourpkgs or (pkgs.callPackage ../pkgs {});
in {
config = {
# Expose `nixos/pkgs` as a new module argument `ourpkgs`.
......
# The overall system test suite for PrivateStorageio NixOS configuration.
{ pkgs }:
{
private-storage = pkgs.nixosTest ./tests/private-storage.nix;
spending = pkgs.nixosTest ./tests/spending.nix;
tahoe = pkgs.nixosTest ./tests/tahoe.nix;
let
# Add custom packages as an attribute, so it they only need to be evalutated once.
# See the comment in `morph/lib/default.nix` for details.
pkgs' = pkgs.extend (self: super: { ourpkgs = self.callPackage ./pkgs {}; });
in {
private-storage = pkgs'.nixosTest ./tests/private-storage.nix;
spending = pkgs'.nixosTest ./tests/spending.nix;
tahoe = pkgs'.nixosTest ./tests/tahoe.nix;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment