summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/share-user-sftp.nix
blob: 26f1d3ba30d2343c55af69bd19ffba46bc0f16f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, ... }:

{
  users.users = {
    share = {
      uid = 9002;
      home = "/var/empty";
      isNormalUser = true;
      openssh.authorizedKeys.keys = [ config.krebs.users.makefu.pubkey ];
    };
  };
  # we will use internal-sftp to make uncomplicated Chroot work
  services.openssh.extraConfig = ''
    Match User share
      ChrootDirectory /media
      ForceCommand internal-sftp
      AllowTcpForwarding no
      PermitTunnel no
      X11Forwarding no
    Match All
  '';
}