tests: minify test machines to decrease runtime
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
self.clanModules.single-disk
|
self.clanModules.single-disk
|
||||||
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
|
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
../lib/minify.nix
|
||||||
];
|
];
|
||||||
clan.single-disk.device = "/dev/vdb";
|
clan.single-disk.device = "/dev/vdb";
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ in
|
|||||||
hostPkgs = pkgs;
|
hostPkgs = pkgs;
|
||||||
# speed-up evaluation
|
# speed-up evaluation
|
||||||
defaults = {
|
defaults = {
|
||||||
nix.package = pkgs.nixVersions.latest;
|
imports = [
|
||||||
|
./minify.nix
|
||||||
|
];
|
||||||
documentation.enable = lib.mkDefault false;
|
documentation.enable = lib.mkDefault false;
|
||||||
boot.isContainer = true;
|
boot.isContainer = true;
|
||||||
|
|
||||||
|
|||||||
7
checks/lib/minify.nix
Normal file
7
checks/lib/minify.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
nixpkgs.flake.setFlakeRegistry = false;
|
||||||
|
nixpkgs.flake.setNixPath = false;
|
||||||
|
nix.registry.nixpkgs.to = { };
|
||||||
|
documentation.doc.enable = false;
|
||||||
|
documentation.man.enable = false;
|
||||||
|
}
|
||||||
@@ -8,9 +8,11 @@ in
|
|||||||
hostPkgs = pkgs;
|
hostPkgs = pkgs;
|
||||||
# speed-up evaluation
|
# speed-up evaluation
|
||||||
defaults = {
|
defaults = {
|
||||||
|
imports = [
|
||||||
|
./minify.nix
|
||||||
|
];
|
||||||
documentation.enable = lib.mkDefault false;
|
documentation.enable = lib.mkDefault false;
|
||||||
nix.settings.min-free = 0;
|
nix.settings.min-free = 0;
|
||||||
nix.package = pkgs.nixVersions.latest;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# to accept external dependencies such as disko
|
# to accept external dependencies such as disko
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ let
|
|||||||
nixpkgs.hostPlatform = lib.mkIf (system != null) (lib.mkDefault system);
|
nixpkgs.hostPlatform = lib.mkIf (system != null) (lib.mkDefault system);
|
||||||
|
|
||||||
# speeds up nix commands by using the nixpkgs from the host system (especially useful in VMs)
|
# speeds up nix commands by using the nixpkgs from the host system (especially useful in VMs)
|
||||||
nix.registry.nixpkgs.to = {
|
nix.registry.nixpkgs.to = lib.mkDefault {
|
||||||
type = "path";
|
type = "path";
|
||||||
path = lib.mkDefault nixpkgs;
|
path = lib.mkDefault nixpkgs;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user