summary refs log tree commit diff
path: root/nixos/tests/initrd-network-ssh/generate-keys.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/initrd-network-ssh/generate-keys.nix')
-rw-r--r--nixos/tests/initrd-network-ssh/generate-keys.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/tests/initrd-network-ssh/generate-keys.nix b/nixos/tests/initrd-network-ssh/generate-keys.nix
new file mode 100644
index 00000000000..3d7978890ab
--- /dev/null
+++ b/nixos/tests/initrd-network-ssh/generate-keys.nix
@@ -0,0 +1,10 @@
+with import ../../.. {};
+
+runCommand "gen-keys" {
+    buildInputs = [ openssh ];
+  }
+  ''
+    mkdir $out
+    ssh-keygen -q -t ed25519 -N "" -f $out/ssh_host_ed25519_key
+    ssh-keygen -q -t ed25519 -N "" -f $out/id_ed25519
+  ''