nixos/tests/predictable-interface-names: Fix systemd reference

pkgs.systemd does not respect config.systemd.package and
config.boot.initrd.systemd.package overrides. Fix references to the
systemd package to ensure that the udevadm used is copied into the
initrd.

(cherry picked from commit 60be170a3a)
This commit is contained in:
dramforever
2026-07-31 19:42:53 +08:00
committed by github-actions[bot]
parent 3c8188d780
commit 4ebe5a3375

View File

@@ -43,10 +43,15 @@ pkgs.lib.listToAttrs (
meta = { };
nodes.machine =
{ pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
script = ''
${lib.getExe' pkgs.systemd "udevadm"} settle --timeout=180
${lib.getExe' config.boot.initrd.systemd.package "udevadm"} settle --timeout=180
ip link
if ${lib.optionalString predictable "!"} ip link show eth0; then
echo Success