From 8735ef24d541469c9fbfda013fe4762ebe82590e Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 15 Mar 2026 15:52:45 -0500 Subject: [PATCH] hostKeyFile variable --- modules/services/ssh.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/services/ssh.nix b/modules/services/ssh.nix index 7143995..56ac2fc 100644 --- a/modules/services/ssh.nix +++ b/modules/services/ssh.nix @@ -8,6 +8,7 @@ in let cfg = config.ssh; userCAPath = "ssh/ssh_user_ca.pub"; + hostKeyFile = "ssh/ssh_host_ed25519_key"; in { options.ssh = { @@ -28,11 +29,11 @@ in { PasswordAuthentication = false; KbdInteractiveAuthentication = false; - HostKey = "/etc/ssh/ssh_host_ed25519_key"; + HostKey = "/etc/${hostKeyFile}"; } (lib.mkIf cfg.certificates.enable { TrustedUserCAKeys = "/etc/${userCAPath}"; - HostCertificate = "/etc/ssh/ssh_host_ed25519_key-cert.pub"; + HostCertificate = "/etc/${hostKeyFile}-cert.pub"; }) ]; };