mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
Revert "nixos/sshd: drop mode from auth keys file".
This reverts commit a3331eb87b
.
See https://github.com/NixOS/nixpkgs/issues/2559#issuecomment-47313334
for a description why this is not a good idea.
I guess it's better to implement a sane way to remove all files in
authorized_keys.d, especially because it is also backwards-compatible.
Reopens #2559.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
865787ef32
commit
da32f052b1
1 changed files with 1 additions and 0 deletions
|
@ -56,6 +56,7 @@ let
|
||||||
authKeysFiles = let
|
authKeysFiles = let
|
||||||
mkAuthKeyFile = u: {
|
mkAuthKeyFile = u: {
|
||||||
target = "ssh/authorized_keys.d/${u.name}";
|
target = "ssh/authorized_keys.d/${u.name}";
|
||||||
|
mode = "0444";
|
||||||
source = pkgs.writeText "${u.name}-authorized_keys" ''
|
source = pkgs.writeText "${u.name}-authorized_keys" ''
|
||||||
${concatStringsSep "\n" u.openssh.authorizedKeys.keys}
|
${concatStringsSep "\n" u.openssh.authorizedKeys.keys}
|
||||||
${concatMapStrings (f: readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
|
${concatMapStrings (f: readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue