sshd: add host ssh cert support

This commit is contained in:
Jörg Thalheim
2024-11-08 16:14:16 +01:00
committed by kenji
parent b54063f173
commit c20085e3c7
5 changed files with 137 additions and 24 deletions

View File

@@ -1,25 +1,6 @@
{ config, pkgs, ... }:
# Dont import this file
# It is only here for backwards compatibility.
# Dont author new modules with this file.
{
services.openssh.enable = true;
services.openssh.settings.PasswordAuthentication = false;
services.openssh.hostKeys = [
{
path = config.clan.core.facts.services.openssh.secret."ssh.id_ed25519".path;
type = "ed25519";
}
];
clan.core.facts.services.openssh = {
secret."ssh.id_ed25519" = { };
public."ssh.id_ed25519.pub" = { };
generator.path = [
pkgs.coreutils
pkgs.openssh
];
generator.script = ''
ssh-keygen -t ed25519 -N "" -f $secrets/ssh.id_ed25519
mv $secrets/ssh.id_ed25519.pub $facts/ssh.id_ed25519.pub
'';
};
imports = [ ./roles/server.nix ];
}