Merge pull request 'tests: minify test machines to decrease runtime' (#2401) from DavHau/clan-core:DavHau-dave into main

This commit is contained in:
clan-bot
2024-11-13 13:44:59 +00:00
5 changed files with 15 additions and 3 deletions

View File

@@ -15,6 +15,7 @@
self.clanModules.single-disk
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
(modulesPath + "/profiles/qemu-guest.nix")
../lib/minify.nix
];
clan.single-disk.device = "/dev/vdb";

View File

@@ -10,7 +10,9 @@ in
hostPkgs = pkgs;
# speed-up evaluation
defaults = {
nix.package = pkgs.nixVersions.latest;
imports = [
./minify.nix
];
documentation.enable = lib.mkDefault false;
boot.isContainer = true;

7
checks/lib/minify.nix Normal file
View 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;
}

View File

@@ -8,9 +8,11 @@ in
hostPkgs = pkgs;
# speed-up evaluation
defaults = {
imports = [
./minify.nix
];
documentation.enable = lib.mkDefault false;
nix.settings.min-free = 0;
nix.package = pkgs.nixVersions.latest;
};
# to accept external dependencies such as disko

View File

@@ -68,7 +68,7 @@ let
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)
nix.registry.nixpkgs.to = {
nix.registry.nixpkgs.to = lib.mkDefault {
type = "path";
path = lib.mkDefault nixpkgs;
};