Skip to content

Commit

Permalink
modules/openssh-pregenerated: use persistent key file path
Browse files Browse the repository at this point in the history
Signed-off-by: Sefa Eyeoglu <[email protected]>
  • Loading branch information
Scrumplex committed Dec 4, 2024
1 parent 911c882 commit 092e94d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/openssh-pregenerated.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
let
keyFile = "/etc/ssh/ssh_host_ed25519_key";
persistentKeyFile = "/nix/persistence/${keyFile}";
in
{
services.openssh = {
hostKeys = [ ];
settings.HostKey = keyFile;
};

# age will be activated, before impermanence mounts persistent files and directories. A workaround is to specify the persistent path for the key file
age.identityPaths = [
keyFile
persistentKeyFile
];
}

0 comments on commit 092e94d

Please sign in to comment.