Fix issue in SSH key config

This commit is contained in:
Kevin Kandlbinder 2023-04-24 12:44:55 +02:00
parent e59f10ac02
commit f8f2b0d808
Signed by: kevin
GPG key ID: 1460B586646E180D

View file

@ -49,9 +49,10 @@ in {
users.users = mkMerge (map (name: (
mkMerge (
map (user: {
"${user}".openssh.authorizedKeys.keys = [
(lib.strings.splitString "\n" (builtins.readFile "../../ssh/${name}/authorized_keys"))
];
"${user}".openssh.authorizedKeys.keys =
(lib.strings.splitString "\n"
(lib.strings.removeSuffix "\n"
(builtins.readFile (./. + "/../../ssh/${name}/authorized_keys"))));
}) cfg.authorized."${name}".users
)
)) (attrNames cfg.authorized));