Merge pull request 'sshd: trust own ed25519 host key as a known host' (#3077) from push-opymuwrqqqvv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3077
This commit is contained in:
@@ -37,6 +37,7 @@ in
|
|||||||
type = "rsa";
|
type = "rsa";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
clan.core.vars.generators.openssh = {
|
clan.core.vars.generators.openssh = {
|
||||||
files."ssh.id_ed25519" = { };
|
files."ssh.id_ed25519" = { };
|
||||||
files."ssh.id_ed25519.pub".secret = false;
|
files."ssh.id_ed25519.pub".secret = false;
|
||||||
@@ -50,6 +51,14 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.ssh.knownHosts.clan-sshd-self-ed25519 = {
|
||||||
|
hostNames = [
|
||||||
|
"localhost"
|
||||||
|
config.networking.hostName
|
||||||
|
] ++ (lib.optional (config.networking.domain != null) cfg.fqdn);
|
||||||
|
publicKey = config.clan.core.vars.generators.openssh.files."ssh.id_ed25519.pub".value;
|
||||||
|
};
|
||||||
|
|
||||||
clan.core.vars.generators.openssh-rsa = lib.mkIf config.clan.sshd.hostKeys.rsa.enable {
|
clan.core.vars.generators.openssh-rsa = lib.mkIf config.clan.sshd.hostKeys.rsa.enable {
|
||||||
files."ssh.id_rsa" = { };
|
files."ssh.id_rsa" = { };
|
||||||
files."ssh.id_rsa.pub".secret = false;
|
files."ssh.id_rsa.pub".secret = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user