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

{
  users.users = {
    share = {
      uid = 9002;
      home = "/var/empty";
      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
  '';
}