1 import ../make-test-python.nix (
5 name = "initrd-network-ssh";
6 meta.maintainers = with lib.maintainers; [
16 "ip=${config.networking.primaryIPAddress}:::255.255.255.0::eth1:none"
18 boot.initrd.network = {
22 authorizedKeys = [ (lib.readFile ./id_ed25519.pub) ];
24 hostKeys = [ ./ssh_host_ed25519_key ];
27 boot.initrd.preLVMCommands = ''
42 text = lib.concatStrings [
44 "${toString (lib.head (lib.splitString " " (toString (lib.elemAt (lib.splitString "\n" config.networking.extraHosts) 2))))} "
45 "${lib.readFile ./ssh_host_ed25519_key.pub}"
49 source = ./id_ed25519;
58 client.wait_for_unit("network.target")
61 def ssh_is_up(_) -> bool:
62 status, _ = client.execute("nc -z server 22")
66 with client.nested("waiting for SSH server to come up"):
71 "ssh -i /etc/sshKey -o UserKnownHostsFile=/etc/knownHosts server 'touch /fnord'"