1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

authkeys path in sshd_config

This commit is contained in:
sbh69840 2023-05-10 21:16:52 +05:30
parent ccaa942888
commit ab2e16159f

View file

@ -90,6 +90,13 @@ let
length u.openssh.authorizedKeys.keys != 0 || length u.openssh.authorizedKeys.keyFiles != 0
));
in listToAttrs (map mkAuthKeyFile usersWithKeys);
authKeysConfiguration =
{
"ssh/sshd_config.d/101-authorized-keys.conf" = {
copy = true;
text = "AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u";
};
};
in
{
@ -128,7 +135,7 @@ in
message = "knownHost ${name} must contain either a publicKey or publicKeyFile";
});
environment.etc = authKeysFiles //
environment.etc = authKeysFiles // authKeysConfiguration //
{ "ssh/ssh_known_hosts".text = (flip (concatMapStringsSep "\n") knownHosts
(h: assert h.hostNames != [];
concatStringsSep "," h.hostNames + " "