1 import ./make-test-python.nix ({ pkgs, lib, ...} : {
2 name = "initrd-network";
4 meta.maintainers = [ pkgs.lib.maintainers.eelco ];
6 nodes.machine = { ... }: {
7 imports = [ ../modules/profiles/minimal.nix ];
8 boot.initrd.network.enable = true;
9 boot.initrd.network.postCommands =
13 ip addr | grep 10.0.2.15 || exit 1
14 ping -c1 10.0.2.2 || exit 1
16 # Check if cleanup was done correctly
17 boot.initrd.postMountCommands = lib.mkAfter
21 ip addr | grep 10.0.2.15 && exit 1
22 ping -c1 10.0.2.2 && exit 1
29 machine.wait_for_unit("multi-user.target")
30 machine.succeed("ip addr show >&2")
31 machine.succeed("ip route show >&2")