commit 03a2eafcfd7b6497cc82865bcdfd23b5978f3772
parent 10a406b632d36afc561bbf0e0d8a22c2b56835a5
Author: Katja (zaphyra) <git@ctu.cx>
Date: Mon, 2 Jun 2025 08:28:58 +0200
parent 10a406b632d36afc561bbf0e0d8a22c2b56835a5
Author: Katja (zaphyra) <git@ctu.cx>
Date: Mon, 2 Jun 2025 08:28:58 +0200
config/nixos/modules/services/openssh: move private key location from `/etc/ssh` to `/var/lib/sshd`
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/config/nixos/modules/services/openssh.nix b/config/nixos/modules/services/openssh.nix @@ -36,6 +36,9 @@ in }; }; + sops.age.sshKeyPaths = [ "/var/lib/sshd/ed25519_hostkey" ]; + modules.filesystem.impermanence.system.dirs = [ "/var/lib/sshd" ]; + services.openssh = { enable = true; @@ -46,7 +49,7 @@ in hostKeys = [ { type = "ed25519"; - path = "/etc/ssh/ed25519_hostkey"; + path = "/var/lib/sshd/ed25519_hostkey"; } ];