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:
parent
ccaa942888
commit
ab2e16159f
1 changed files with 8 additions and 1 deletions
|
@ -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 + " "
|
||||
|
|
Loading…
Add table
Reference in a new issue