diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-01-02 16:03:22 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-01-02 16:03:22 +0530 |
commit | 84fb4decd77e893a3551bfbef36fb789a563434e (patch) | |
tree | 866a7df0442d09056b41e86d22e5087ef91a1970 /hosts/kay | |
parent | 38888f1de8f150cf7e4b7de866e5c5817c81c215 (diff) |
kay/sftp: init new sftp user
Diffstat (limited to 'hosts/kay')
-rw-r--r-- | hosts/kay/modules/sftp.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/hosts/kay/modules/sftp.nix b/hosts/kay/modules/sftp.nix index 175a269..b969652 100644 --- a/hosts/kay/modules/sftp.nix +++ b/hosts/kay/modules/sftp.nix @@ -1,12 +1,23 @@ -{ ... }: +{ config, ... }: let storage = "/hdd/users"; + pubkeys = config.userdata.pubKeys; in { users = { groups."sftp".members = []; + users."sftp" = { + group = "sftp"; + shell = "/run/current-system/sw/bin/nologin"; + isNormalUser = true; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmA1dyV+o9gfoxlbVG0Y+dn3lVqdFs5fMqfxyNc5/Lr sftp@cez" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDCbgjAfyDNtLNyOS+sfLirYtfEAkGqV54LOwabpWkvf sftp@veu" + ] ++ pubkeys; + }; + users."nazer" = { group = "sftp"; shell = "/run/current-system/sw/bin/nologin"; |