mirror of
https://github.com/RGBCube/agenix
synced 2025-07-29 01:37:44 +00:00
dev: add integration test
This commit is contained in:
parent
6aec6889ba
commit
419c6cc281
4 changed files with 83 additions and 0 deletions
15
test/install_ssh_host_keys.nix
Normal file
15
test/install_ssh_host_keys.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Do not copy this! It is insecure. This is only okay because we are testing.
|
||||
{
|
||||
system.activationScripts.agenixRoot.deps = [ "installSSHHostKeys" ];
|
||||
|
||||
system.activationScripts.installSSHHostKeys.text = ''
|
||||
mkdir -p /etc/ssh
|
||||
(umask u=rw,g=r,o=r; cp ${../example_keys/system1.pub} /etc/ssh/ssh_host_ed25519_key.pub)
|
||||
(
|
||||
umask u=rw,g=,o=
|
||||
cp ${../example_keys/system1} /etc/ssh/ssh_host_ed25519_key
|
||||
touch /etc/ssh/ssh_host_rsa_key
|
||||
)
|
||||
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue