aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-14 03:26:12 +0100
committertv <tv@krebsco.de>2026-11-14 03:35:25 +0100
commit4ed0731ecab446ed0cc4a6146df414a36978e05b (patch)
treedff1378fff43036f0970e1f8b5efc40007ac02b1 /pkgs/populate
parent4742c6de2c532e6b1be145a5544d815fc95199b4 (diff)
tests: silence network interface warnings
Diffstat (limited to 'pkgs/populate')
-rw-r--r--pkgs/populate/tests/vm.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/populate/tests/vm.nix b/pkgs/populate/tests/vm.nix
index dc599dd..55362f9 100644
--- a/pkgs/populate/tests/vm.nix
+++ b/pkgs/populate/tests/vm.nix
@@ -29,7 +29,7 @@ let
})
scenarios));
- common = { pkgs, ... }: {
+ common = { config, pkgs, ... }: {
imports = [ module ];
# The plan refers to all scripts the scenarios run. Being part of the
# system, they survive the scenarios collecting garbage.
@@ -52,6 +52,17 @@ let
systemd.oomd.enable = false;
virtualisation.memorySize = 2048;
virtualisation.diskSize = 4096;
+ networking.useNetworkd = true;
+ systemd.network.networks = let
+ qemu-common = import (pkgs.path + "/nixos/lib/qemu-common.nix") {
+ inherit lib; inherit (pkgs) stdenv;
+ };
+ mac = i: lib.toLower
+ (qemu-common.qemuNicMac i.vlan config.virtualisation.test.nodeNumber);
+ in
+ lib.mapAttrs' (_: i: lib.nameValuePair "40-${i.name}" {
+ matchConfig = lib.mkForce { PermanentMACAddress = mac i; };
+ }) config.virtualisation.allInterfaces;
};
in pkgs.testers.runNixOSTest {