add run-vm-test-offline package for offline VM testing

This package allows running NixOS VM tests in an offline environment
using network namespace isolation. It builds the test driver and runs
it with unshare to ensure no network access.
This commit is contained in:
Jörg Thalheim
2025-06-17 13:41:20 +02:00
parent 79f1bed800
commit f7f6b22f92
2 changed files with 41 additions and 0 deletions

View File

@@ -112,6 +112,9 @@ in
cp ${../flake.lock} $out/flake.lock
'';
};
packages = lib.optionalAttrs (pkgs.stdenv.isLinux) {
run-vm-test-offline = pkgs.callPackage ../pkgs/run-vm-test-offline { };
};
legacyPackages = {
nixosTests =
let