This should allow for disks to survive destruction of instances. Also support creating additional disks on hetzner, storing a mapping of nix names for disks with their linux device paths. Something similiar should also be possible to create for openstack allowing a provider agnostic way of mapping between them.
22 lines
628 B
Nix
22 lines
628 B
Nix
{
|
|
khscodes.services.openssh.hostCertificate.path = "\${ vault_mount.ssh-host.path }";
|
|
khscodes.infrastructure.provisioning.configuration.modules = [
|
|
(
|
|
{ config, ... }:
|
|
{
|
|
khscodes.vault.mount.ssh-host = {
|
|
type = "ssh";
|
|
path = "ssh-host";
|
|
default_lease_ttl_seconds = 24 * 60 * 60;
|
|
max_lease_ttl_seconds = 24 * 60 * 60;
|
|
};
|
|
|
|
resource.vault_ssh_secret_backend_ca.ssh-host = {
|
|
backend = config.khscodes.vault.output.mount.ssh-host.path;
|
|
generate_signing_key = true;
|
|
key_type = "ed25519";
|
|
};
|
|
}
|
|
)
|
|
];
|
|
}
|