summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-01-02 16:03:22 +0530
committersinanmohd <sinan@sinanmohd.com>2024-01-02 16:03:22 +0530
commit84fb4decd77e893a3551bfbef36fb789a563434e (patch)
tree866a7df0442d09056b41e86d22e5087ef91a1970
parent38888f1de8f150cf7e4b7de866e5c5817c81c215 (diff)
kay/sftp: init new sftp user
-rw-r--r--hosts/kay/modules/sftp.nix13
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";