diff --git a/shared/applications/state/ssh.nix b/shared/applications/state/ssh.nix index 653f470..b5a2da5 100644 --- a/shared/applications/state/ssh.nix +++ b/shared/applications/state/ssh.nix @@ -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"; } ]; }