shared.state.ssh: specify hostkeys location instead of impermanence

This commit is contained in:
eyjhb 2024-08-21 21:19:04 +02:00
parent 6f261c6b78
commit c40778e628
No known key found for this signature in database
GPG key ID: 609F508E3239F920

View file

@ -1,6 +1,10 @@
{
environment.persistence.root.files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_rsa_key"
{ config, ... }:
let
statePath = config.environment.persistence.root.persistentStoragePath + "/etc/ssh";
in {
services.openssh.hostKeys = [
{ path = statePath + "/ssh_host_rsa_key"; type = "rsa"; bits = 4096; }
{ path = statePath + "/ssh_host_ed25519_key"; type = "ed25519"; }
];
}