added auto key generation to ssh

This commit is contained in:
Leyla Becker 2025-01-04 15:20:51 -06:00
parent 994234c18b
commit e2d3bb5d01
4 changed files with 104 additions and 10 deletions

View file

@ -19,12 +19,9 @@
}
(lib.mkIf config.host.impermanence.enable {
environment.persistence."/persist/system/root" = {
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"
];
files = lib.lists.flatten (
builtins.map (hostKey: [hostKey.path "${hostKey.path}.pub"]) config.services.openssh.hostKeys
);
};
})
];