mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
cc925d0506
This allows us to use it for EC2 instances.
22 lines
539 B
Nix
22 lines
539 B
Nix
import ./make-test.nix ({ pkgs, ...} : {
|
|
name = "initrd-network";
|
|
|
|
meta.maintainers = [ pkgs.stdenv.lib.maintainers.eelco ];
|
|
|
|
machine = { config, pkgs, ... }: {
|
|
imports = [ ../modules/profiles/minimal.nix ];
|
|
boot.initrd.network.enable = true;
|
|
boot.initrd.network.postCommands =
|
|
''
|
|
ip addr | grep 10.0.2.15 || exit 1
|
|
ping -c1 10.0.2.2 || exit 1
|
|
'';
|
|
};
|
|
|
|
testScript =
|
|
''
|
|
startAll;
|
|
$machine->waitForUnit("multi-user.target");
|
|
$machine->succeed("ip link >&2");
|
|
'';
|
|
})
|