From f8f2b0d808b6dedaa83ed8eaae1ebedc2b5a977c Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Mon, 24 Apr 2023 12:44:55 +0200 Subject: [PATCH] Fix issue in SSH key config --- nixos/modules/ssh.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/ssh.nix b/nixos/modules/ssh.nix index 2997cdf..bccb1b1 100644 --- a/nixos/modules/ssh.nix +++ b/nixos/modules/ssh.nix @@ -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));