flake/hosts/vultr/common/preservation.nix

16 lines
380 B
Nix
Raw Normal View History

2024-09-21 16:21:30 +00:00
{ lib, ... }:
{
sops.age.sshKeyPaths = lib.mkForce [ "/persist/etc/ssh/ssh_host_ed25519_key" ];
preservation.enable = true;
preservation.preserveAt."/persist" = {
directories = [ "/var" ];
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
];
};
}