From f8cea6f6c8a8ce35533d7fa978dbff8cd5427b7c Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Mon, 8 Jan 2024 23:09:42 +0530 Subject: modules/userdata: refactor --- hosts/kay/modules/sftp.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hosts/kay/modules/sftp.nix') diff --git a/hosts/kay/modules/sftp.nix b/hosts/kay/modules/sftp.nix index b969652..07b1449 100644 --- a/hosts/kay/modules/sftp.nix +++ b/hosts/kay/modules/sftp.nix @@ -2,7 +2,8 @@ let storage = "/hdd/users"; - pubkeys = config.userdata.pubKeys; + user = config.userdata.user; + pubKeys = config.users.users.${user}.openssh.authorizedKeys.keys; in { users = { @@ -15,7 +16,7 @@ in openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmA1dyV+o9gfoxlbVG0Y+dn3lVqdFs5fMqfxyNc5/Lr sftp@cez" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDCbgjAfyDNtLNyOS+sfLirYtfEAkGqV54LOwabpWkvf sftp@veu" - ] ++ pubkeys; + ] ++ pubKeys; }; users."nazer" = { -- cgit v1.2.3