nixos/initrd-network-ssh: fix test
The test relied on moving `initrd` secrets from the store into the
`initrd` which was fine here as it's only an integration test and not a
production environment.
However, this broke in 20.09 when support for this was dropped[1]. To make
sure that the snakeoil key used as hostkey for `sshd` here actually gets
copied into the VM, I added a small script for this that takes care of
this process while building the initial ramdisk.
[1] d930466b77
This commit is contained in:
parent
92781c27bd
commit
819b0f4bb8
|
@ -22,6 +22,10 @@ import ../make-test-python.nix ({ lib, ... }:
|
||||||
hostKeys = [ ./ssh_host_ed25519_key ];
|
hostKeys = [ ./ssh_host_ed25519_key ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
boot.initrd.extraUtilsCommands = ''
|
||||||
|
mkdir -p $out/secrets/etc/ssh
|
||||||
|
cat "${./ssh_host_ed25519_key}" > $out/secrets/etc/ssh/sh_host_ed25519_key
|
||||||
|
'';
|
||||||
boot.initrd.preLVMCommands = ''
|
boot.initrd.preLVMCommands = ''
|
||||||
while true; do
|
while true; do
|
||||||
if [ -f fnord ]; then
|
if [ -f fnord ]; then
|
||||||
|
|
Loading…
Reference in New Issue